forked from frappe/books
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvue.config.js
40 lines (36 loc) · 947 Bytes
/
vue.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
const path = require('path');
const webpack = require('webpack');
module.exports = {
pages: {
index: {
entry: 'src/main.js',
filename: 'index.html'
},
print: {
entry: 'src/print.js',
filename: 'print.html'
}
},
runtimeCompiler: true,
lintOnSave: process.env.NODE_ENV !== 'production',
configureWebpack(config) {
Object.assign(config.resolve.alias, {
deepmerge$: 'deepmerge/dist/umd.js',
'frappe-charts$': 'frappe-charts/dist/frappe-charts.esm.js',
'~': path.resolve('.')
});
config.plugins.push(
// https://github.com/knex/knex/issues/1446#issuecomment-537715431
new webpack.ContextReplacementPlugin(
/knex[/\\]lib[/\\]dialects/,
/sqlite3[/\\]index.js/
)
);
config.module.rules.push({
test: /\.txt$/i,
use: 'raw-loader'
});
config.devtool = 'source-map';
},
transpileDependencies: ['frappejs']
};