-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
Following the instructions provided in README.md causes webpack to throw the following error:
Module not found: Error: Can't resolve 'url' in '{projectPath}/node_modules/@saucelabs/theme-github-codeblock/build/theme/ReferenceCodeBlock'
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: { "url": require.resolve("url/") }'
- install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "url": false }
client (webpack 5.75.0) compiled with 1 error
Apparently in order to use this theme, you need to manually configure webpack to include or ignore that url module. This happens because this theme imports Node's url module, and this doesn't really fix it.
Based on that, I have a few suggestions to tackle this problem:
- Document the steps to either polyfill or ignore the
urlmodule; - Provide a plugin that does that automatically;
- Remove dependency on
urlmodule;
Metadata
Metadata
Assignees
Labels
No labels