fix(build): prevent all styles from being purged
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
4 files changed
+7
-4
No files matched your search
+1
-1
@@ -3,7 +3,7 @@
|
||||
"description": " ",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"deploy": "webpack --mode production",
|
||||
"deploy": "NODE_ENV=production webpack --mode production",
|
||||
"watch": "webpack --mode development --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 3.6 KiB |
@@ -9,6 +9,10 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
module.exports = (env, options) => {
|
||||
const devMode = options.mode !== 'production';
|
||||
|
||||
const PATHS = {
|
||||
src: path.join(__dirname, '../')
|
||||
}
|
||||
|
||||
return {
|
||||
optimization: {
|
||||
minimizer: [
|
||||
@@ -47,7 +51,7 @@ module.exports = (env, options) => {
|
||||
},
|
||||
plugins: [
|
||||
new MiniCssExtractPlugin({ filename: '../css/app.css' }),
|
||||
new CopyWebpackPlugin([{ from: 'static/', to: '../' }])
|
||||
new CopyWebpackPlugin([{ from: 'static/', to: '../' }]),
|
||||
]
|
||||
.concat(devMode ? [new HardSourceWebpackPlugin()] : [])
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user