2020-05-26 16:15:01 +00:00
|
|
|
/*---------------------------------------------------------------------------------------------
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
//@ts-check
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const withDefaults = require('../shared.webpack.config');
|
|
|
|
const path = require('path');
|
2020-05-27 20:35:37 +00:00
|
|
|
const webpack = require('webpack');
|
2020-05-26 16:15:01 +00:00
|
|
|
|
2020-05-27 20:35:37 +00:00
|
|
|
const vscodeNlsReplacement = new webpack.NormalModuleReplacementPlugin(
|
2020-06-02 12:40:47 +00:00
|
|
|
/vscode\-nls[\\/]lib[\\/]main\.js/,
|
2020-05-27 20:35:37 +00:00
|
|
|
path.join(__dirname, 'client/out/browser/vscodeNlsShim.js')
|
|
|
|
);
|
|
|
|
|
|
|
|
const clientConfig = withDefaults({
|
2020-05-26 16:15:01 +00:00
|
|
|
target: 'webworker',
|
|
|
|
context: path.join(__dirname, 'client'),
|
|
|
|
entry: {
|
2020-05-27 20:35:37 +00:00
|
|
|
extension: './src/browser/cssClientMain.ts'
|
2020-05-26 16:15:01 +00:00
|
|
|
},
|
|
|
|
output: {
|
2020-05-27 20:35:37 +00:00
|
|
|
filename: 'cssClientMain.js',
|
2020-05-26 16:15:01 +00:00
|
|
|
path: path.join(__dirname, 'client', 'dist', 'browser')
|
|
|
|
}
|
|
|
|
});
|
2020-05-27 20:35:37 +00:00
|
|
|
clientConfig.plugins[1] = vscodeNlsReplacement; // replace nls bundler
|
|
|
|
clientConfig.module.rules[0].use.shift(); // remove nls loader
|
|
|
|
|
2020-06-08 16:06:26 +00:00
|
|
|
module.exports = clientConfig;
|