mirror of
https://github.com/Microsoft/vscode
synced 2024-10-06 03:17:00 +00:00
disable nls on the web for now (#157665)
This commit is contained in:
parent
41d9c49659
commit
bcb31b9cfb
|
@ -112,24 +112,27 @@ function withBrowserDefaults(/**@type WebpackConfig*/extConfig, /** @type Additi
|
||||||
rules: [{
|
rules: [{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: [{
|
use: [
|
||||||
// vscode-nls-dev loader:
|
// TODO: bring this back once vscode-nls-dev supports browser
|
||||||
// * rewrite nls-calls
|
// {
|
||||||
loader: 'vscode-nls-dev/lib/webpack-loader',
|
// // vscode-nls-dev loader:
|
||||||
options: {
|
// // * rewrite nls-calls
|
||||||
base: path.join(extConfig.context, 'src')
|
// loader: 'vscode-nls-dev/lib/webpack-loader',
|
||||||
}
|
// options: {
|
||||||
}, {
|
// base: path.join(extConfig.context, 'src')
|
||||||
// configure TypeScript loader:
|
// }
|
||||||
// * enable sources maps for end-to-end source maps
|
// },
|
||||||
loader: 'ts-loader',
|
{
|
||||||
options: {
|
// configure TypeScript loader:
|
||||||
compilerOptions: {
|
// * enable sources maps for end-to-end source maps
|
||||||
'sourceMap': true,
|
loader: 'ts-loader',
|
||||||
},
|
options: {
|
||||||
...(additionalOptions ? {} : { configFile: additionalOptions.configFile })
|
compilerOptions: {
|
||||||
}
|
'sourceMap': true,
|
||||||
}]
|
},
|
||||||
|
...(additionalOptions ? {} : { configFile: additionalOptions.configFile })
|
||||||
|
}
|
||||||
|
}]
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {
|
||||||
|
@ -162,10 +165,10 @@ function withBrowserDefaults(/**@type WebpackConfig*/extConfig, /** @type Additi
|
||||||
*/
|
*/
|
||||||
function browserPlugins(context) {
|
function browserPlugins(context) {
|
||||||
// Need to find the top-most `package.json` file
|
// Need to find the top-most `package.json` file
|
||||||
const folderName = path.relative(__dirname, context).split(/[\\\/]/)[0];
|
// const folderName = path.relative(__dirname, context).split(/[\\\/]/)[0];
|
||||||
const pkgPath = path.join(__dirname, folderName, 'package.json');
|
// const pkgPath = path.join(__dirname, folderName, 'package.json');
|
||||||
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
// const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
||||||
const id = `${pkg.publisher}.${pkg.name}`;
|
// const id = `${pkg.publisher}.${pkg.name}`;
|
||||||
return [
|
return [
|
||||||
new optimize.LimitChunkCountPlugin({
|
new optimize.LimitChunkCountPlugin({
|
||||||
maxChunks: 1
|
maxChunks: 1
|
||||||
|
@ -180,7 +183,8 @@ function browserPlugins(context) {
|
||||||
'process.env': JSON.stringify({}),
|
'process.env': JSON.stringify({}),
|
||||||
'process.env.BROWSER_ENV': JSON.stringify('true')
|
'process.env.BROWSER_ENV': JSON.stringify('true')
|
||||||
}),
|
}),
|
||||||
new NLSBundlePlugin(id)
|
// TODO: bring this back once vscode-nls-dev supports browser
|
||||||
|
// new NLSBundlePlugin(id)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue