-
Notifications
You must be signed in to change notification settings - Fork 123
/
mainConfig.js
27 lines (24 loc) · 1.29 KB
/
mainConfig.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
requirejs.config({
useStrict: true,
inlineText: true,
// stubModules : ['text'],
baseUrl: 'Source',
skipModuleInsertion: false,
paths: {
'require-less': '../bower_components/require-less',
'almond': '../bower_components/almond/almond',
'KnockoutES5': '../bower_components/knockout-es5/dist/knockout-es5.min',
'knockout': '../bower_components/knockout/dist/knockout',
'Hammer': '../bower_components/hammerjs/hammer.min',
'markdown-it': '../bower_components/markdown-it/dist/markdown-it.min',
'markdown-it-sanitizer': '../bower_components/markdown-it-sanitizer/dist/markdown-it-sanitizer.min',
'Cesium': 'empty:'
// 'text' : 'ThirdParty/requirejs-2.1.22/text'
},
onBuildWrite: function (moduleName, path, contents) {
// replace all require-less calls to dummy ones because they are only needed for the optimization
return contents.replace(/('|")require-less\/less.*?\1/g, '$1dummy/require-less/less/dummy$1');
},
// those are only needed during optimization where an css is generated, so no need to pack them but only the wrapped output
excludeShallow: ['require-less/less', 'require-less/normalize', 'require-less/lessc', 'require-less/less-builder', 'require-less/lessc-server']
});