Webpack configuration for building an embeddable widget #70092
Unanswered
cladams7905
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I am trying to create an embeddable widget that others can use on their site by creating a separate webpack entry within my project, however I keep on getting this error with my next.config.mjs file: "Entry widget depends on main, but this entry was not found." I have confirmed that my path to the widget entry is correct, but it still is not working correctly. Any ideas why?
Here is my next.config.mjs:
`import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, { isServer }) => {
if (!isServer) {
const originalEntry = config.entry;
},
};
export default nextConfig;
`
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions