Browse Source

packages update, use "mini-css-extract-plugin" instead of "extract-text-webpack-plugin"

Alexander Rose 6 years ago
parent
commit
d101dbaa4f
3 changed files with 615 additions and 240 deletions
  1. 605 227
      package-lock.json
  2. 7 7
      package.json
  3. 3 6
      webpack.config.js

File diff suppressed because it is too large
+ 605 - 227
package-lock.json


+ 7 - 7
package.json

@@ -70,33 +70,33 @@
     "@types/benchmark": "^1.0.31",
     "@types/compression": "0.0.36",
     "@types/express": "^4.16.0",
-    "@types/jest": "^23.1.2",
-    "@types/node": "~10.5.0",
+    "@types/jest": "^23.1.4",
+    "@types/node": "~10.5.1",
     "@types/node-fetch": "^2.1.1",
-    "@types/react": "^16.4.3",
+    "@types/react": "^16.4.6",
     "@types/react-dom": "^16.0.6",
     "benchmark": "^2.1.4",
     "copyfiles": "^2.0.0",
     "cpx": "^1.5.0",
     "css-loader": "^0.28.11",
     "extra-watch-webpack-plugin": "^1.0.3",
-    "extract-text-webpack-plugin": "^4.0.0-beta.0",
     "file-loader": "^1.1.11",
     "glslify-import": "^3.1.0",
     "glslify-loader": "^1.0.2",
     "jest": "^23.2.0",
     "jest-raw-loader": "^1.0.1",
+    "mini-css-extract-plugin": "^0.4.1",
     "node-sass": "^4.9.0",
     "raw-loader": "^0.5.1",
     "resolve-url-loader": "^2.3.0",
     "sass-loader": "^7.0.3",
     "style-loader": "^0.21.0",
-    "ts-jest": "^22.4.6",
+    "ts-jest": "^23.0.0",
     "tslint": "^5.10.0",
     "typescript": "^2.9.2",
-    "uglify-js": "^3.4.2",
+    "uglify-js": "^3.4.3",
     "util.promisify": "^1.0.0",
-    "webpack": "^4.12.2",
+    "webpack": "^4.14.0",
     "webpack-cli": "^3.0.8"
   },
   "dependencies": {

+ 3 - 6
webpack.config.js

@@ -1,6 +1,6 @@
 const path = require('path');
 const ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');
-const ExtractTextPlugin = require('extract-text-webpack-plugin');
+const MiniCssExtractPlugin = require("mini-css-extract-plugin");
 module.exports = {
     module: {
         rules: [
@@ -25,10 +25,7 @@ module.exports = {
             },
             {
                 test:/\.(s*)css$/,
-                use: ExtractTextPlugin.extract({
-                    fallback:'style-loader',
-                    use:['css-loader', 'resolve-url-loader', 'sass-loader'],
-                })
+                use: [ MiniCssExtractPlugin.loader, 'css-loader', 'resolve-url-loader', 'sass-loader' ]
             }
         ]
     },
@@ -42,6 +39,6 @@ module.exports = {
                 './build/node_modules/**/*.html'
             ],
         }),
-        new ExtractTextPlugin({ filename:'app.css' }),
+        new MiniCssExtractPlugin({ filename: "app.css" })
     ],
 }

Some files were not shown because too many files changed in this diff