-
-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathwebpack.config.js
More file actions
33 lines (32 loc) · 769 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
33 lines (32 loc) · 769 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
31
32
33
module.exports = env => {
const isV3 = !!env.v3
const loaderName = `vue-loader${isV3 ? '': '-old'}`;
const { VueLoaderPlugin } = require(loaderName);
return {
mode: process.env.NODE_ENV,
entry: ["./src/vue-wait.js"],
output: {
library: "VueWait",
libraryTarget: "umd",
globalObject: 'typeof self !== \'undefined\' ? self : this',
filename: `vue-wait${isV3 ? '-next': '-v2'}.js`
},
externals: { vue: 'vue' },
module: {
rules: [
{
test: /\.vue$/,
loader: loaderName
},
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}
]
},
plugins: [new VueLoaderPlugin()]
}
};