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: Modify Webpack sourcemap parameters to account for Windows path separators #2465

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions examples/custom-generator-codelab/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ module.exports = (env, argv) => {

// Include the source maps for Blockly for easier debugging Blockly code.
config.module.rules.push({
test: /(blockly\/.*\.js)$/,
test: /(blockly[/\\].*\.js)$/,
use: [require.resolve('source-map-loader')],
enforce: 'pre',
});

// Ignore spurious warnings from source-map-loader
// It can't find source maps for some Closure modules and that is expected
config.ignoreWarnings = [/Failed to parse source map/];
config.ignoreWarnings = [/Failed to parse source map.*blockly/];
}
return config;
};
4 changes: 2 additions & 2 deletions examples/custom-renderer-codelab/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ module.exports = (env, argv) => {

// Include the source maps for Blockly for easier debugging Blockly code.
config.module.rules.push({
test: /(blockly\/.*\.js)$/,
test: /(blockly[/\\].*\.js)$/,
use: [require.resolve('source-map-loader')],
enforce: 'pre',
});

// Ignore spurious warnings from source-map-loader
// It can't find source maps for some Closure modules and that is expected
config.ignoreWarnings = [/Failed to parse source map/];
config.ignoreWarnings = [/Failed to parse source map.*blockly/];
}
return config;
};
4 changes: 2 additions & 2 deletions examples/keyboard-navigation-codelab/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ module.exports = (env, argv) => {

// Include the source maps for Blockly for easier debugging Blockly code.
config.module.rules.push({
test: /(blockly\/.*\.js)$/,
test: /(blockly[/\\].*\.js)$/,
use: [require.resolve('source-map-loader')],
enforce: 'pre',
});

// Ignore spurious warnings from source-map-loader
// It can't find source maps for some Closure modules and that is expected
config.ignoreWarnings = [/Failed to parse source map/];
config.ignoreWarnings = [/Failed to parse source map.*blockly/];
}
return config;
};
4 changes: 2 additions & 2 deletions examples/sample-app-ts/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ module.exports = (env, argv) => {

// Include the source maps for Blockly for easier debugging Blockly code.
config.module.rules.push({
test: /(blockly\/.*\.js)$/,
test: /(blockly[/\\].*\.js)$/,
use: [require.resolve('source-map-loader')],
enforce: 'pre',
});

// Ignore spurious warnings from source-map-loader
// It can't find source maps for some Closure modules and that is expected
config.ignoreWarnings = [/Failed to parse source map/];
config.ignoreWarnings = [/Failed to parse source map.*blockly/];
}
return config;
};
4 changes: 2 additions & 2 deletions examples/sample-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ module.exports = (env, argv) => {

// Include the source maps for Blockly for easier debugging Blockly code.
config.module.rules.push({
test: /(blockly\/.*\.js)$/,
test: /(blockly[/\\].*\.js)$/,
use: [require.resolve('source-map-loader')],
enforce: 'pre',
});

// Ignore spurious warnings from source-map-loader
// It can't find source maps for some Closure modules and that is expected
config.ignoreWarnings = [/Failed to parse source map/];
config.ignoreWarnings = [/Failed to parse source map.*blockly/];
}
return config;
};
4 changes: 2 additions & 2 deletions plugins/dev-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module.exports = (env) => {
rules: [
// Load Blockly source maps.
{
test: /(blockly\/.*\.js)$/,
test: /(blockly[/\\].*\.js)$/,
use: [require.resolve('source-map-loader')],
enforce: 'pre',
},
Expand All @@ -119,7 +119,7 @@ module.exports = (env) => {
},
// Ignore spurious warnings from source-map-loader
// It can't find source maps for some Closure modules and that is expected
ignoreWarnings: [/Failed to parse source map/],
ignoreWarnings: [/Failed to parse source map.*blockly/],
plugins,
externals: isProduction
? {
Expand Down
Loading