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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/webpack/src/utils/with-web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function withWeb() {
loader: require.resolve('sass-loader'),
options: {
implementation: require('sass'),
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,

sassOptions: {
fiber: false,
// bootstrap-sass requires a minimum precision of 8
Expand All @@ -195,7 +195,7 @@ export function withWeb() {
{
loader: require.resolve('less-loader'),
options: {
sourceMap: options.sourceMap,
sourceMap: !!options.sourceMap,
lessOptions: {
javascriptEnabled: true,
...lessPathOptions,
Expand All @@ -212,7 +212,7 @@ export function withWeb() {
{
loader: require.resolve('stylus-loader'),
options: {
sourceMap: options.sourceMap,
sourceMap: !!options.sourceMap,
stylusOptions: {
include: includePaths,
},
Expand All @@ -237,7 +237,7 @@ export function withWeb() {
loader: require.resolve('sass-loader'),
options: {
implementation: require('sass'),
sourceMap: options.sourceMap,
sourceMap: !!options.sourceMap,
sassOptions: {
fiber: false,
// bootstrap-sass requires a minimum precision of 8
Expand All @@ -256,7 +256,7 @@ export function withWeb() {
{
loader: require.resolve('less-loader'),
options: {
sourceMap: options.sourceMap,
sourceMap: !!options.sourceMap,
lessOptions: {
javascriptEnabled: true,
...lessPathOptions,
Expand All @@ -273,7 +273,7 @@ export function withWeb() {
{
loader: require.resolve('stylus-loader'),
options: {
sourceMap: options.sourceMap,
sourceMap: !!options.sourceMap,
stylusOptions: {
include: includePaths,
},
Expand Down