mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1356586 - Properly exclude dirs for babel transpilation; r=rickychien
MozReview-Commit-ID: E2iLUstNiZq --HG-- extra : rebase_source : 45bb2d458bde55e7290a9cfbff90a34a05b6d301
This commit is contained in:
parent
875f27030a
commit
f1d56688d3
@ -115,9 +115,11 @@ const mappings = [
|
||||
webpackConfig.plugins = mappings.map(([regex, res]) =>
|
||||
new NormalModuleReplacementPlugin(regex, res));
|
||||
|
||||
// Exclude to transplie all scripts in devtools/ but not for this folder
|
||||
webpackConfig.babelExcludes = new RegExp(
|
||||
`^${path.join(__dirname, "../../")}(.(?!${path.basename(__dirname)}))*$`);
|
||||
// Exclude to transpile all scripts in devtools/ but not for this folder
|
||||
const basePath = path.join(__dirname, "../../").replace(/\\/g, "\\\\");
|
||||
const baseName = path.basename(__dirname);
|
||||
webpackConfig.babelExcludes = new RegExp(`^${basePath}(.(?!${baseName}))*$`);
|
||||
|
||||
let config = toolboxConfig(webpackConfig, getConfig());
|
||||
|
||||
// Remove loaders from devtools-launchpad's webpack.config.js
|
||||
|
Loading…
Reference in New Issue
Block a user