mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Convert extension webpack scripts to modules
This commit is contained in:
@@ -2,19 +2,15 @@
|
||||
* 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 CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const path = require('path');
|
||||
// @ts-check
|
||||
import withDefaults, { nodePlugins } from '../shared.webpack.config.mjs';
|
||||
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
||||
import path from 'path';
|
||||
|
||||
const isWindows = process.platform === 'win32';
|
||||
|
||||
module.exports = withDefaults({
|
||||
context: __dirname,
|
||||
export default withDefaults({
|
||||
context: import.meta.dirname,
|
||||
entry: {
|
||||
extension: './src/extension.ts'
|
||||
},
|
||||
@@ -26,11 +22,11 @@ module.exports = withDefaults({
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'keytar': path.resolve(__dirname, 'packageMocks', 'keytar', 'index.js')
|
||||
'keytar': path.resolve(import.meta.dirname, 'packageMocks', 'keytar', 'index.js')
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
...withDefaults.nodePlugins(__dirname),
|
||||
...nodePlugins(import.meta.dirname),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user