-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
70 lines (69 loc) · 1.45 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
const webpack = require('webpack')
const secrets = require('./secrets.json')
module.exports = {
devServer: {
contentBase: `${process.cwd()}/public`,
host: '0.0.0.0',
historyApiFallback: true,
noInfo: true
},
devtool: 'eval-source-map',
entry: {
app: './src/main.js'
},
eslint: {
formatter: require('eslint-friendly-formatter')
},
module: {
loaders: [
{
test: /\.vue$/,
loader: 'vue'
}, {
test: /\.js$/,
loader: 'babel!eslint',
exclude: /node_modules/
}, {
test: /\.json$/,
loader: 'json'
}, {
test: /\.(png|jpg|gif|svg)$/,
loader: 'url',
query: {
limit: 10000,
name: '[name].[ext]?[hash]'
}
}
]
},
plugins: [
new webpack.DefinePlugin({
__DEBUG__: true,
__MAPS_KEY__: JSON.stringify(secrets.development.GOOGLE_MAPS_API_KEY)
})
],
output: {
path: `${process.cwd()}/public/assets`,
publicPath: '/assets',
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.vue'],
alias: {
'src': `${process.cwd()}/src`
}
},
vue: {
loaders: {
js: 'babel!eslint',
postcss: [
require('postcss-font-magician')(),
require('postcss-url')(),
require('postcss-cssnext')(),
require('postcss-browser-reporter')(),
require('postcss-reporter')()
],
autoprefixer: false
}
}
}