mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
add client/server browser parts
This commit is contained in:
@@ -9,15 +9,40 @@
|
||||
|
||||
const withDefaults = require('../shared.webpack.config');
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
module.exports = withDefaults({
|
||||
const vscodeNlsReplacement = new webpack.NormalModuleReplacementPlugin(
|
||||
/vscode\-nls\/lib\/main\.js/,
|
||||
path.join(__dirname, 'client/out/browser/vscodeNlsShim.js')
|
||||
);
|
||||
|
||||
const clientConfig = withDefaults({
|
||||
target: 'webworker',
|
||||
context: path.join(__dirname, 'client'),
|
||||
entry: {
|
||||
extension: './src/browser/cssClientBrowserMain.ts',
|
||||
extension: './src/browser/cssClientMain.ts'
|
||||
},
|
||||
output: {
|
||||
filename: 'cssClientBrowserMain.js',
|
||||
filename: 'cssClientMain.js',
|
||||
path: path.join(__dirname, 'client', 'dist', 'browser')
|
||||
}
|
||||
});
|
||||
clientConfig.plugins[1] = vscodeNlsReplacement; // replace nls bundler
|
||||
clientConfig.module.rules[0].use.shift(); // remove nls loader
|
||||
|
||||
const serverConfig = withDefaults({
|
||||
target: 'webworker',
|
||||
context: path.join(__dirname, 'server'),
|
||||
entry: {
|
||||
extension: './src/browser/cssServerMain.ts',
|
||||
},
|
||||
output: {
|
||||
filename: 'cssServerMain.js',
|
||||
path: path.join(__dirname, 'server', 'dist', 'browser'),
|
||||
libraryTarget: 'var'
|
||||
}
|
||||
});
|
||||
serverConfig.plugins[1] = vscodeNlsReplacement; // replace nls bundler
|
||||
serverConfig.module.rules[0].use.shift(); // remove nls loader
|
||||
|
||||
module.exports = [clientConfig, serverConfig];
|
||||
|
||||
Reference in New Issue
Block a user