sarsooxyz.pyreact/webpack.common.js

32 lines
696 B
JavaScript
Raw Permalink Normal View History

2019-06-03 15:53:58 +01:00
const path = require('path');
const webpack = require('webpack');
2019-07-25 10:05:19 +01:00
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
2019-06-03 15:53:58 +01:00
module.exports = {
2019-06-06 16:56:44 +01:00
entry: {
dev: './src/js/dev/dev.js'
2019-06-06 16:56:44 +01:00
},
2019-06-03 15:53:58 +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"]
}
]
},
2019-07-25 10:05:19 +01:00
plugins: [
new CleanWebpackPlugin()
],
2019-06-03 15:53:58 +01:00
resolve: { extensions: ["*", ".js", ".jsx"] },
output: {
2019-06-06 16:56:44 +01:00
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'build/js')
2019-06-03 15:53:58 +01:00
}
};