mirror of
https://github.com/adminkit/adminkit.git
synced 2026-03-31 11:47:45 +01:00
Optimize webpack.config.js file
This commit is contained in:
+12
-16
@@ -51,15 +51,17 @@ module.exports = {
|
||||
]
|
||||
}),
|
||||
// Copy dist folder to static
|
||||
new FileManagerPlugin({
|
||||
events: {
|
||||
onEnd: {
|
||||
copy: [
|
||||
{ source: "./dist/", destination: "./static" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}),
|
||||
...(process.env.NODE_ENV === "production")? [
|
||||
new FileManagerPlugin({
|
||||
events: {
|
||||
onEnd: {
|
||||
copy: [
|
||||
{ source: "./dist/", destination: "./static" }
|
||||
]
|
||||
}
|
||||
},
|
||||
})
|
||||
] : [],
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
@@ -81,12 +83,7 @@ module.exports = {
|
||||
MiniCssExtractPlugin.loader,
|
||||
"css-loader",
|
||||
"postcss-loader",
|
||||
{
|
||||
loader: "sass-loader",
|
||||
options: {
|
||||
implementation: require.resolve("sass"),
|
||||
}
|
||||
}
|
||||
"sass-loader"
|
||||
]
|
||||
},
|
||||
// Load fonts
|
||||
@@ -118,7 +115,6 @@ module.exports = {
|
||||
static: {
|
||||
directory: Path.join(__dirname, "static")
|
||||
},
|
||||
compress: true,
|
||||
port: 8080,
|
||||
open: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user