-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
40 lines (39 loc) 路 895 Bytes
/
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
/* eslint-disable */
const webpack = require('webpack');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
mode: process.env.NODE_ENV || 'production',
devtool: 'source-map',
entry: './src/VuePolling.vue',
output: {
path: __dirname + '/dist',
filename: 'VuePolling.js',
libraryTarget: 'umd',
library: 'VuePolling'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test: /\.css$/,
use: ['vue-style-loader', 'css-loader']
}
]
},
externals: ['vue'],
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
}),
// make sure to include the plugin for the magic
new VueLoaderPlugin()
]
};