Validation error on options.sourceMap when using devtool default
See original GitHub issueApologies if this is some other issue, but this keeps showing up when I upgrade to sass-loader 11.0.1
, and it seems to be due to the default devtool value getting passed through and then being an invalid option?
- Operating System: Mac OS X
- Node Version: v12.16.2
- NPM Version: yarn 1.22.5
- webpack Version: 5.36.2
- sass-loader Version: 11.0.1
Expected Behavior
If I set webpack config devtool
setting to eval
or eval-source-map
in development mode, -or- add EvalSourceMapDevToolPlugin
, project builds.
Actual Behavior
I get a validation error: `Module build failed (from ./node_modules/sass-loader/dist/cjs.js): ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.
- options.sourceMap should be a boolean.`
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Webpack 5: devtool ValidationError, invalid configuration object
Webpack has been initialized using a configuration object that does not match the API schema. - configuration.devtool should match pattern "^( ...
Read more >Webpack is producing invalid sourcemaps? #8302 - GitHub
My hypothesis is that the orig_map (which has been essentially passed through to terser from webpack) has incorrect mappings (the "non-minified ...
Read more >Devtool - webpack
devtool performance production quality
(none) build: fastest rebuild: fastest yes bundle
eval build: fast rebuild: fastest no generated
eval‑cheap‑source‑map build: ok rebuild: fast no transformed
Read more >Browser console shows DevTools failed to load SourceMap ...
Solution · Go to the developer tools (F12 in the browser); · Select the Cogwheel in the upper right corner; · In the...
Read more >Debug Node.js Apps using Visual Studio Code
Setting up a project for Node.js debugging is straightforward with VS Code providing appropriate launch configuration defaults and snippets.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good call. Creating an example it turns out that the error is in https://github.com/shakacode/bootstrap-loader being incompatible with sass-loader 11.x, not in sass-loader itself. Thanks for helping talk me through it!
hm, maybe you can create example? using
EvalSourceMapDevToolPlugin
should not breaksass-loader