Skip to content

Commit

Permalink
fix: filename.replace error and update mini-css-extract-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed May 15, 2019
1 parent e6f16ed commit 1165ee8
Show file tree
Hide file tree
Showing 3 changed files with 1,621 additions and 2,162 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"start:demo": "cross-env NODE_ENV=development webpack-dev-server --mode development --open --config tools/webpack.config --copy",
"semantic-release": "semantic-release --ci --debug",
"travis-deploy-once": "travis-deploy-once --pro",
"prepare": "npm --prefix ./node_modules/mini-css-extract-plugin install ./node_modules/mini-css-extract-plugin && npm run --prefix ./node_modules/mini-css-extract-plugin build",
"prepush": "yarn test",
"defaults": "webpack-defaults"
},
Expand Down Expand Up @@ -132,7 +131,7 @@
"lint-staged": "7.3.0",
"lodash": "^4.17.11",
"mi18n": "0.4.6",
"mini-css-extract-plugin": "https://github.com/Draggable/mini-css-extract-plugin/tarball/feat/filename-transform",
"mini-css-extract-plugin": "^0.6.0",
"node-sass": "^4.11.0",
"npm-run-all": "^4.1.5",
"optimize-css-assets-webpack-plugin": "5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion tools/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const plugins = [
}),
new HtmlWebpackHarddiskPlugin({ outputPath: './demo/' }),
new MiniCssExtractPlugin({
filename: ({ name }) => `${name.replace('/js/', '/css/')}.min.css`,
moduleFilename: ({ name }) => `${name.replace('/js/', '/css/')}.min.css`,
}),
new BannerPlugin(bannerTemplate),
new CompressionPlugin({
Expand Down
Loading

0 comments on commit 1165ee8

Please sign in to comment.