-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.common.js
More file actions
30 lines (29 loc) · 931 Bytes
/
Copy pathwebpack.common.js
File metadata and controls
30 lines (29 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* eslint-disable import/no-extraneous-dependencies */
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');
/* eslint-enable import/no-extraneous-dependencies */
module.exports = {
entry: './app/index.jsx',
plugins: [
new HtmlWebpackPlugin({ template: `${__dirname}/app/index.html`, inject: 'head' }),
new ScriptExtHtmlWebpackPlugin({ defaultAttribute: 'defer', module: ['bundle'] }),
],
output: { path: `${__dirname}/dist` },
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader', 'eslint-loader', 'stylelint-custom-processor-loader'],
},
],
},
resolve: {
extensions: ['.js', '.jsx'],
alias: {
app: `${__dirname}/app`,
components: `${__dirname}/app/components`,
containers: `${__dirname}/app/containers`,
},
},
};