forked from Detachment/Build-vue-hackernews-2.0-from-scratch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (41 loc) · 1.19 KB
/
webpack.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
42
const vueConfig = require('./vue-loader.config')
const path = require('path')
const webpack = require('webpack')
module.exports = {
devtool: '#source-map', // emit accurate source map for better debug
entry: './src/entry.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'bundle.js'
},
module: {
noParse: /es6-promise\.js$/, // avoid webpack shimming process
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueConfig
},
{
test: /\.js$/,
loader: 'buble-loader',
exclude: path.resolve(__dirname, './node_modules/'),
options: {
objectAssign: 'Object.assign'
}
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'url-loader',
options: {
limit: 10000,
name: '[name].[ext]?[hash]'
}
}
]
},
performance: {
hints: process.env.NODE_ENV === 'production' ? 'warning' : false
}
}