vscode/extensions/html-language-features/server/extension-browser.webpack.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-06-19 21:35:45 +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';
2020-06-25 21:21:56 +00:00
const withBrowserDefaults = require('../../shared.webpack.config').browser;
2020-06-19 21:35:45 +00:00
const path = require('path');
2020-06-25 21:21:56 +00:00
const serverConfig = withBrowserDefaults({
2020-06-19 21:35:45 +00:00
context: __dirname,
entry: {
extension: './src/browser/htmlServerWorkerMain.ts',
2020-06-19 21:35:45 +00:00
},
output: {
filename: 'htmlServerMain.js',
path: path.join(__dirname, 'dist', 'browser'),
2021-07-08 19:41:03 +00:00
libraryTarget: 'var',
library: 'serverExportVar'
2020-06-19 21:35:45 +00:00
},
2020-06-25 09:48:16 +00:00
optimization: {
splitChunks: {
chunks: 'async'
2020-06-25 09:48:16 +00:00
}
2020-06-19 21:35:45 +00:00
}
});
2021-07-08 19:41:03 +00:00
serverConfig.module.noParse = /typescript[\/\\]lib[\/\\]typescript\.js/;
2020-06-23 20:43:25 +00:00
serverConfig.module.rules.push({
test: /javascriptLibs.ts$/,
use: [
{
loader: path.resolve(__dirname, 'build', 'javaScriptLibraryLoader.js')
}
]
});
2020-06-19 21:35:45 +00:00
module.exports = serverConfig;