forked from r03ert0/microdraw
-
Notifications
You must be signed in to change notification settings - Fork 8
/
webpack.pages.config.js
41 lines (40 loc) · 1.05 KB
/
webpack.pages.config.js
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
31
32
33
34
35
36
37
38
39
40
41
/* eslint-disable prefer-exponentiation-operator */
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = (env, argv) => ({
entry: {
'project-new-page': './app/views/scripts/src/project-new-page.js',
'project-settings-page':
'./app/views/scripts/src/project-settings-page.js',
'user-page': './app/views/scripts/src/user-page.js'
},
devtool: 'eval-source-map',
plugins: [new CleanWebpackPlugin(['dist'])],
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'app/views/scripts/dist')
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(png|svg|jpg|gif)$/,
use: ['file-loader']
}
]
},
resolve: {
symlinks: false,
alias: {
// for now using the browser build to parse existing inlined components
vue: path.resolve(
`./node_modules/vue/dist/vue.esm-browser${
argv.mode === 'production' ? '.prod' : ''
}`
)
}
}
});