-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I'm trying to use ejs in my content script but getting an error related to using webpack 5. The solution it says is to add a polyfill to webpack.config.js. But I can't figure out how to do this using extension-cli as the config file is not generated and looking at the gulpfile it seems there's no simple way to add one.
The error output is
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
So it looks like I just need to have a config file with the following...
module.exports = {
...
resolve: {
fallback: {
"fs": false,
"path": require.resolve("path-browserify")
}
},
};
Is there currently a way to do this?
moeakwak, Jannes-Dailidow, atx-barnes, lectrician1, claritytech1008 and 2 more
Metadata
Metadata
Assignees
Labels
No labels