-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
45 lines (45 loc) · 1.22 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
// Webpack config for building - separate to that in vue.config.js which is for testapp
const nodeExternals = require('webpack-node-externals')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const path = require('path')
// Set app 'root' to testapp for 'vue-cli-service serve'
module.exports = {
externals: [nodeExternals()],
// Disable performance/asset size warnings due to using non-minified etc modules
performance: { hints: false },
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
{
test: /\.vue$/,
exclude: /(node_modules|bower_components)/,
loader: 'vue-loader',
},
{
test: /\.css$/,
exclude: /(node_modules|bower_components)/,
loader: 'css-loader',
},
],
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'tabularasa.js',
library: {
root: 'tabularasa',
},
libraryTarget: 'umd',
},
plugins: [
new VueLoaderPlugin()
],
}