I have a project without javascript but would like to use webpack 4 and postcss. Every time I run webpack --mode development
, a "style.js" is automatically created in the ./dist folder.
How can I prevent this?
webpack.config.js:
module.exports = {
entry: { style: "./src/8px.css" },
output: {
path: path.resolve(__dirname, "dist")
},
plugins: [
new MiniCssExtractPlugin({
filename: "8px.css"
})
],
module: {
rules: [
{
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
{ loader: "css-loader", options: { importLoaders: 1 } },
"postcss-loader"
]
}
]
}
};