Skip to content
Permalink
Browse files

feat: webpack 4 support (#413)

  • Loading branch information...
getkey authored and tivac committed Mar 8, 2018
1 parent e8adce6 commit 7b2f2851c14807b829cfc1fec4a27ee2c580940f
@@ -1,6 +1,6 @@
# Webpack 2
# Webpack 2/3/4

`modular-css/webpack/plugin` provides a webpack 2 plugin you can use to transform imported `.css` files into lookup objects while outputting CSS to disk.
`modular-css/webpack/plugin` provides a webpack 2/3/4 plugin you can use to transform imported `.css` files into lookup objects while outputting CSS to disk.

`modular-css/webpack/loader` provides the file loader that does the actual transformation on files.

@@ -66,4 +66,4 @@ All other options are passed to the underlying `Processor` instance, see [Option

### `namedExports`

Set to `false` to disable named exports, instead only the default export wll be used. This is useful to avoid warnings when your classes aren't valid JS identifiers.
Set to `false` to disable named exports, instead only the default export will be used. This is useful to avoid warnings when your classes aren't valid JS identifiers.
@@ -8,7 +8,9 @@ var utils = require("loader-utils"),
module.exports = function(source) {
var options = utils.getOptions(this) || false,
done = this.async(),
processor = this.options.processor;
processor = this.options
? this.options.processor // Webpack 2 & 3
: this._compiler.options.processor; // Webpack 4

if(options.cjs) {
this.emitWarning(
@@ -20,7 +20,7 @@
],
"devDependencies": {
"test-utils": "^8.0.0",
"webpack": "^3.5.6"
"webpack": "^4.1.0"
},
"dependencies": {
"esutils": "^2.0.2",
@@ -3,7 +3,8 @@
"byIdentifier": {
"packages/webpack/test/specimens/simple.js": 0,
"packages/webpack/loader.js!packages/webpack/test/specimens/simple.css": 1,
"packages/webpack/loader.js??ref--0!packages/webpack/test/specimens/simple.css": 2
"packages/webpack/loader.js??ref--0!packages/webpack/test/specimens/simple.css": 2,
"packages/webpack/loader.js??ref--4!packages/webpack/test/specimens/simple.css": 1
},
"usedIds": {
"0": 0,
@@ -16,8 +17,9 @@
"main": 0
},
"byBlocks": {},
"usedIds": {
"0": 0
}
"usedIds": [
0
],
"bySource": {}
}
}

0 comments on commit 7b2f285

Please sign in to comment.
You can’t perform that action at this time.