forked from Marduk-Project/bia-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
52 lines (49 loc) · 1.18 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
/**
* Vue build configurations
*/
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
// envs
process.env.VUE_APP_EJS_OPEN_TAG = '<%';
process.env.VUE_APP_EJS_CLOSE_TAG = '%>';
module.exports = {
publicPath: '/',
outputDir: 'server/public/',
indexPath: 'index.html',
assetsDir: 'static',
filenameHashing: true,
pages: {
index: {
entry: 'front/js/context/visitor/index.js',
template: 'front/js/context/visitor/index.ejs',
filename: '../views/visitor/index.ejs',
title: 'Index Page',
chunks: ['chunk-vendors', 'chunk-common', 'index']
},
admin: {
entry: 'front/js/context/admin/index.js',
template: 'front/js/context/admin/index.ejs',
filename: '../views/admin/index.ejs',
title: 'Index Page',
chunks: ['chunk-vendors', 'chunk-common', 'admin']
},
},
css: {
extract: true,
sourceMap: true,
},
configureWebpack: {
output: {
filename: "static/js/[name].[hash].js",
chunkFilename: "static/js/[id].[chunkhash].js"
},
plugins: [
new CopyPlugin([
{
from: 'front/img/',
to: 'static/img/',
},
]),
],
},
};