Optimize webpack.config.js file

This commit is contained in:
Paul Laros
2023-06-08 22:53:05 +02:00
parent a799cd5630
commit 8eddf462d3
+5 -9
View File
@@ -51,6 +51,7 @@ module.exports = {
]
}),
// Copy dist folder to static
...(process.env.NODE_ENV === "production")? [
new FileManagerPlugin({
events: {
onEnd: {
@@ -58,8 +59,9 @@ module.exports = {
{ 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
}