Browse Source

Changes to ESM output for webviews

main
Eric Amodio 1 year ago
parent
commit
e6571aa295
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      webpack.config.js

+ 6
- 0
webpack.config.js View File

@ -201,6 +201,7 @@ function getExtensionConfig(target, mode, env) {
? {
loader: 'esbuild-loader',
options: {
format: 'esm',
implementation: esbuild,
target: ['es2022', 'chrome102', 'node16.14.2'],
tsconfig: path.join(
@ -363,9 +364,13 @@ function getWebviewsConfig(mode, env) {
devtool: mode === 'production' ? false : 'source-map',
output: {
filename: '[name].js',
libraryTarget: 'module',
path: path.join(__dirname, 'dist', 'webviews'),
publicPath: '#{root}/dist/webviews/',
},
experiments: {
outputModule: true,
},
optimization: {
minimizer:
mode === 'production'
@ -431,6 +436,7 @@ function getWebviewsConfig(mode, env) {
? {
loader: 'esbuild-loader',
options: {
format: 'esm',
implementation: esbuild,
target: 'es2021',
tsconfig: path.join(basePath, 'tsconfig.json'),

Loading…
Cancel
Save