30 lines
737 B
JavaScript
30 lines
737 B
JavaScript
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||
|
const path = require('path');
|
||
|
|
||
|
module.exports = {
|
||
|
entry: {
|
||
|
netclock: './js/netclock.js',
|
||
|
countdown: './js/countdown.js'
|
||
|
},
|
||
|
plugins: [
|
||
|
new CleanWebpackPlugin()
|
||
|
],
|
||
|
output: {
|
||
|
filename: '[name].bundle.js',
|
||
|
path: path.resolve(__dirname, 'static', 'dist')
|
||
|
},
|
||
|
module: {
|
||
|
rules: [{
|
||
|
test: /\.s[ac]ss$/i,
|
||
|
use: [
|
||
|
// Creates `style` nodes from JS strings
|
||
|
'style-loader',
|
||
|
// Translates CSS into CommonJS
|
||
|
'css-loader',
|
||
|
// Compiles Sass to CSS
|
||
|
'sass-loader',
|
||
|
]
|
||
|
}]
|
||
|
}
|
||
|
};
|