mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
add postLoaders
This commit is contained in:
parent
3018f82cf2
commit
c78ce05a8e
3 changed files with 12 additions and 0 deletions
|
@ -145,6 +145,7 @@
|
|||
"gruntify-eslint": "^1.0.0",
|
||||
"html-entities": "^1.1.1",
|
||||
"husky": "^0.8.1",
|
||||
"istanbul-instrumenter-loader": "^0.1.3",
|
||||
"karma": "^0.13.3",
|
||||
"karma-chrome-launcher": "^0.2.0",
|
||||
"karma-firefox-launcher": "^0.1.6",
|
||||
|
|
|
@ -125,6 +125,7 @@ class BaseOptimizer {
|
|||
}, babelOptions)
|
||||
}
|
||||
].concat(this.env.loaders),
|
||||
postLoaders: this.env.postLoaders || [],
|
||||
noParse: this.env.noParse,
|
||||
},
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ module.exports = class UiBundlerEnv {
|
|||
|
||||
// webpack loaders map loader configuration to regexps
|
||||
this.loaders = [];
|
||||
this.postLoaders = [];
|
||||
}
|
||||
|
||||
consumePlugin(plugin) {
|
||||
|
@ -74,6 +75,11 @@ module.exports = class UiBundlerEnv {
|
|||
for (let loader of arr(spec)) this.addLoader(loader);
|
||||
};
|
||||
|
||||
case 'postLoaders':
|
||||
return (plugin, spec) => {
|
||||
for (let loader of arr(spec)) this.addPostLoader(loader);
|
||||
};
|
||||
|
||||
case 'noParse':
|
||||
return (plugin, spec) => {
|
||||
for (let re of arr(spec)) this.addNoParse(re);
|
||||
|
@ -94,6 +100,10 @@ module.exports = class UiBundlerEnv {
|
|||
this.loaders.push(loader);
|
||||
}
|
||||
|
||||
addPostLoader(loader) {
|
||||
this.postLoaders.push(loader);
|
||||
}
|
||||
|
||||
addNoParse(regExp) {
|
||||
this.noParse.push(regExp);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue