forked from DevExpress/DevExtreme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
49 lines (48 loc) · 2.17 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
46
47
48
49
/* eslint-env node */
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
mode: 'production',
optimization: {
// eslint-disable-next-line spellcheck/spell-checker
minimizer: [new TerserPlugin({
extractComments: false,
})],
},
output: {
sourcePrefix: ' ',
devtoolModuleFilenameTemplate: 'devextreme:///[resource-path]',
devtoolFallbackModuleFilenameTemplate: 'devextreme:///[resource-path]?[hash]'
},
externals: {
// Optional (calling through window to skip error on script load)
'jquery': 'window.jQuery',
'jszip': 'window.JSZip',
'knockout': 'window.ko',
'angular': 'window.angular',
'globalize': 'window.Globalize',
'globalize/number': 'window.Globalize',
'globalize/currency': 'window.Globalize',
'globalize/date': 'window.Globalize',
'globalize/message': 'window.Globalize',
'devextreme-quill': 'window.DevExpress.Quill',
'turndown': 'window.TurndownService',
'devextreme-showdown': 'window.showdown',
'exceljs': 'window.ExcelJS',
'jspdf': 'window.jspdf.jsPDF',
'devexpress-diagram': 'window.DevExpress.diagram',
'devexpress-gantt': 'window.DevExpress.Gantt',
'luxon': 'window.luxon'
},
resolve: {
alias: {
'@devextreme/vdom': path.resolve('./node_modules/@devextreme/vdom/dist/cjs/index.js'),
'@devextreme/runtime/common': path.resolve('./node_modules/@devextreme/runtime/cjs/common/index.js'),
'@devextreme/runtime/inferno': path.resolve('./node_modules/@devextreme/runtime/cjs/inferno/index.js'),
'@devextreme/runtime/declarations': path.resolve('./node_modules/@devextreme/runtime/cjs/declarations/index.js'),
'@devextreme/runtime/angular': path.resolve('./node_modules/@devextreme/runtime/cjs/angular/index.js'),
'@devextreme/runtime/vue': path.resolve('./node_modules/@devextreme/runtime/cjs/vue/index.js'),
'@devextreme/runtime/react': path.resolve('./node_modules/@devextreme/runtime/cjs/react/index.js')
}
},
};