Files
dialog-relations-website/webpack.config.js

34 lines
832 B
JavaScript

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = (env, argv) => {
const isProduction = argv.mode === 'production';
return {
mode: isProduction ? 'production' : 'development',
entry: './packages/base/Resources/Public/Scss/main.scss',
output: {
path: path.resolve(__dirname, 'packages/base/Resources/Public/Css'),
filename: 'main.js' // JS not needed, but required by Webpack. The CSS will be extracted.
},
module: {
rules: [
{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader', // Always use postcss-loader
'sass-loader'
]
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: 'main.css'
})
]
};
};