jonnybarnes.uk/webpack.config.js
Jonny Barnes 5ef23376be Work so far in refactoring front-end
- Mainly getting rid of existing css/js
- No longer linking to stuff like a11y.css
- Creating a FrontPageController to better deal with the home page
2019-07-26 10:40:56 +01:00

37 lines
962 B
JavaScript
Vendored

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
devtool: 'source-map',
entry: [
'./resources/sass/app.scss'
],
output: {
path: path.resolve('./public/assets'),
},
module: {
rules: [{
test: /\.scss$/,
use: [{
loader: MiniCssExtractPlugin.loader, options: {
sourceMap: true
}
}, {
loader: 'css-loader', options: {
sourceMap: true
}
}, {
loader: 'sass-loader', options: {
sourceMap: true,
}
}]
}]
},
plugins: [
new MiniCssExtractPlugin({
filename: 'app.css',
chunkFilename: 'app.css',
}),
]
};