Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webpack): sourceMap option must be a boolean if/when passed to loaders #14622

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

janeklb
Copy link
Contributor

@janeklb janeklb commented Jan 25, 2023

Current Behavior

When using sourceMap: 'hidden' as an nx webpack config option you see errors from loaders

eg.

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.
   -> Enables/Disables generation of source maps.
   -> Read more at https://github.com/webpack-contrib/sass-loader#sourcemap

Expected Behavior

No errors when specifying 'hidden' as the sourceMap config.

Note, all modified loader configs expect a boolean:

@vercel
Copy link

vercel bot commented Jan 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
nx-dev ⬜️ Ignored (Inspect) Jan 25, 2023 at 9:58PM (UTC)

sourceMap: options.sourceMap,
sourceMap: !!options.sourceMap,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution is already being used below

sourceMap: !!options.sourceMap,

@AgentEnder AgentEnder merged commit 177f1b7 into nrwl:master Jan 25, 2023
@janeklb janeklb deleted the jlb/sourceMap-hidden-fix branch January 26, 2023 00:11
FrozenPandaz pushed a commit that referenced this pull request Jan 27, 2023
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants