bootstrap-webpack
Advanced tools
Comparing version 0.0.2 to 0.0.3
module.exports = function () {}; | ||
module.exports.pitch = function (remainingRequest) { | ||
this.cacheable(true); | ||
var config = require(this.resourcePath); | ||
var postStyleLoaders = ''; | ||
if((typeof config.postStyleLoaders !== 'undefined') && (config.postStyleLoaders.length > 0)){ | ||
postStyleLoaders = config.postStyleLoaders.join('!') + '!'; | ||
} | ||
return [ | ||
'require(' + JSON.stringify("-!" + require.resolve("style-loader") + '!' + require.resolve("css-loader") + | ||
'require(' + JSON.stringify("-!" + postStyleLoaders + require.resolve("style-loader") + '!' + require.resolve("css-loader") + | ||
'!' + require.resolve("less-loader") + '!' + require.resolve("./bootstrap-styles.loader.js") + '!' + remainingRequest) + ');', | ||
@@ -7,0 +12,0 @@ 'require(' + JSON.stringify("-!" + require.resolve("./bootstrap-scripts.loader.js") + "!" + remainingRequest) + ');' |
@@ -5,3 +5,3 @@ { | ||
"main": "index.js", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"loader": "index.loader.js", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
@@ -93,2 +93,24 @@ bootstrap-webpack | ||
@btn-default-bg: #eee; | ||
``` | ||
``` | ||
### extract-text-webpack-plugin | ||
Configure post style loaders in `bootstrap.config.js`. | ||
Example: | ||
``` javascript | ||
module.exports = { | ||
postStyleLoaders: [ | ||
require.resolve('extract-text-webpack-plugin/loader.js') + '?{"omit":1,"extract":true,"remove":true}' | ||
], | ||
scripts: { | ||
... | ||
}, | ||
styles: { | ||
... | ||
} | ||
}; | ||
``` | ||
Install `extract-text-webpack-plugin` before using this configuration. |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7551
148
115
2