2020-09-12 10:58:38 +00:00
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
|
|
|
netclock: './js/netclock.js',
|
2020-09-14 19:13:25 +00:00
|
|
|
|
2020-09-13 18:04:03 +00:00
|
|
|
countdown_create: './countdown/templates/countdown/create.js',
|
|
|
|
countdown_view: './countdown/templates/countdown/view.js',
|
2020-09-14 19:13:25 +00:00
|
|
|
countdown_created: './countdown/templates/countdown/created.js',
|
|
|
|
|
|
|
|
worldclock_create: './worldclock/templates/worldclock/create.js'
|
2020-09-12 10:58:38 +00:00
|
|
|
},
|
|
|
|
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',
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
};
|