diff --git a/extensions/python/extension-browser.webpack.config.js b/extensions/python/extension-browser.webpack.config.js new file mode 100644 index 00000000000..cce20bf3da3 --- /dev/null +++ b/extensions/python/extension-browser.webpack.config.js @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * 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'); + +const clientConfig = withDefaults({ + target: 'webworker', + context: __dirname, + entry: { + extension: './src/pythonMain.ts' + }, + output: { + filename: 'pythonMain.js' + }, + performance: { + hints: false + }, + resolve: { + alias: { + 'vscode-nls': path.resolve(__dirname, '../../build/polyfills/vscode-nls.js') + } + } +}); +clientConfig.module.rules[0].use.shift(); // remove nls loader + +module.exports = clientConfig; diff --git a/extensions/python/package.json b/extensions/python/package.json index 1a7a65b2dee..ab813f048d1 100644 --- a/extensions/python/package.json +++ b/extensions/python/package.json @@ -8,6 +8,7 @@ "engines": { "vscode": "*" }, "activationEvents": ["onLanguage:python"], "main": "./out/pythonMain", + "browser": "./dist/pythonMain", "extensionKind": [ "ui", "workspace" ], "contributes": { "languages": [{