summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.orion.client.javascript/webpack.config.js
blob: 4234b9ccbb2ad4f70b288c9c964d85a293db0925 (plain)
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
/*eslint-env node */
/* eslint-disable missing-nls */
var path = require('path');
var name = "./built-js/orionJavaScript.js";
if(process.argv.indexOf('-p') > -1) {
	name = "./built-js/orionJavaScript.min.js";
}

module.exports = {
    entry: './web/javascript/api/javaScript.js',
    output: {
    	libraryTarget: 'umd',
        filename: name,
        sourceMapFilename: '[file].map'
    },
    resolve: {
    	root: [
	       path.resolve('./web'),  //the js bundle path
	       path.resolve('../org.eclipse.orion.client.core/web'), // core
	       path.resolve('../org.eclipse.orion.client.editor/web'), // editor
	       path.resolve('../org.eclipse.orion.client.ui/web') //UI
    	]
    },
    resolveLoader: {
    	alias: {
    		json: 'json-loader',
    		i18n: 'amdi18n-loader'
    	}
    },
    //debug: true,
    devtool: "source-map"
};