-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathwebpack.config.js
More file actions
86 lines (84 loc) · 1.66 KB
/
webpack.config.js
File metadata and controls
86 lines (84 loc) · 1.66 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
'use strict'
const path = require('path')
const Dotenv = require('dotenv-webpack')
const dotenv = new Dotenv()
module.exports = {
egg: true,
framework: 'vue',
resolve: {
modules: [path.resolve(__dirname, 'node_modules')],
},
alias: {
'@': 'app/web',
asset: 'app/web/assets',
component: 'app/web/components',
framework: 'app/web/framework',
},
compile: {
thread: false,
cache: true,
},
dll: [
{
name: 'base', // easywebpack will automatically create a common chunk for all pages, and will crush if we create common lib here.
lib: [
'vue',
'axios',
'vue-router',
'vuex',
'vuex-router-sync',
'vue-i18n',
'lodash',
'js-cookie',
'babel-polyfill',
'moment',
'qiniu-js',
'blueimp-md5',
'filesize',
'html2canvas',
'js-base64',
],
},
{
name: 'charts',
lib: ['echarts', 'v-charts'],
},
// fix el-tooltip not visible
// {
// name: 'elementUI',
// lib: ['element-ui']
// },
{
name: 'markdown',
lib: ['vue-markdown'],
},
],
devtool: 'cheap-module-eval-source-map',
loaders: {
scss: true,
md: {
test: /\.md$/,
loader: 'raw-loader',
},
babel: {
exclude: /node_modules(?!(\/|\\)vue-socket.io)/,
},
},
plugins: {
imagemini: false,
clean: false,
// serviceworker: true,
// analyzer: true,
dotenv,
copy: [
{
from: path.resolve(__dirname, 'app/static'),
to: path.resolve(__dirname, 'public'),
},
],
},
node: {
console: true,
},
optimization: {},
}