2019-07-26 14:18:32 +01:00
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
2019-07-29 11:44:10 +01:00
|
|
|
app: './src/js/app.js',
|
|
|
|
login: './src/js/login.js'
|
2019-07-26 14:18:32 +01:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.(js|jsx)$/,
|
|
|
|
exclude: /(node_modules|bower_components)/,
|
|
|
|
loader: "babel-loader",
|
|
|
|
options: { presets: ["@babel/env"] }
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: ["style-loader", "css-loader"]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new CleanWebpackPlugin()
|
|
|
|
],
|
|
|
|
resolve: { extensions: ["*", ".js", ".jsx"] },
|
|
|
|
output: {
|
|
|
|
filename: '[name].bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'build/js')
|
|
|
|
}
|
|
|
|
};
|