used shared webpack-config for browser

This commit is contained in:
Martin Aeschlimann
2020-06-25 23:21:56 +02:00
parent 5e870a6627
commit 16be2c9885
21 changed files with 97 additions and 184 deletions

View File

@@ -7,36 +7,25 @@
'use strict';
const withDefaults = require('../../shared.webpack.config');
const withBrowserDefaults = require('../../shared.webpack.config').browser;
const path = require('path');
const serverConfig = withDefaults({
target: 'webworker',
const serverConfig = withBrowserDefaults({
context: __dirname,
entry: {
extension: './src/browser/htmlServerMain.ts',
},
output: {
filename: 'htmlServerMain.js',
path: path.join(__dirname, 'dist', 'browser'),
libraryTarget: 'var'
},
performance: {
hints: false
},
optimization: {
splitChunks: {
chunks: "async"
}
},
resolve: {
alias: {
'vscode-nls': path.resolve(__dirname, '../../../build/polyfills/vscode-nls.js')
}
}
});
serverConfig.module.rules[0].use.shift(); // remove nls loader
serverConfig.module.noParse = /typescript\/lib\/typescript\.js/;
serverConfig.module.rules.push({
test: /javascriptLibs.ts$/,