mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
[html/css/json] pass the location of the localization bundle to the server (#168111)
pass the location of the localization bundle to the server
This commit is contained in:
committed by
GitHub
parent
6e3976f744
commit
b27ee6b7b5
@@ -13,7 +13,7 @@ const path = require('path');
|
||||
module.exports = withBrowserDefaults({
|
||||
context: __dirname,
|
||||
entry: {
|
||||
extension: './src/browser/jsonServerMain.ts',
|
||||
extension: './src/browser/jsonServerWorkerMain.ts',
|
||||
},
|
||||
output: {
|
||||
filename: 'jsonServerMain.js',
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
"request-light": "^0.6.0",
|
||||
"vscode-json-languageservice": "^5.1.3",
|
||||
"vscode-languageserver": "^8.1.0-next.2",
|
||||
"vscode-uri": "^3.0.6"
|
||||
"vscode-uri": "^3.0.6",
|
||||
"@vscode/l10n": "^0.0.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^9.1.1",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
declare let self: any;
|
||||
|
||||
import * as l10n from '@vscode/l10n';
|
||||
|
||||
let initialized = false;
|
||||
self.onmessage = async (e: any) => {
|
||||
if (!initialized) {
|
||||
initialized = true;
|
||||
const i10lLocation = e.data.i10lLocation;
|
||||
if (i10lLocation) {
|
||||
await l10n.config({ uri: i10lLocation });
|
||||
}
|
||||
await import('./jsonServerMain');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user