diff --git a/src/webviews/apps/home/home.html b/src/webviews/apps/home/home.html index c75d829..bf5ed1e 100644 --- a/src/webviews/apps/home/home.html +++ b/src/webviews/apps/home/home.html @@ -2,12 +2,6 @@ - @@ -16,8 +10,13 @@
- #{endOfBody} + diff --git a/src/webviews/apps/welcome/welcome.html b/src/webviews/apps/welcome/welcome.html index d1e765d..6a7f3a1 100644 --- a/src/webviews/apps/welcome/welcome.html +++ b/src/webviews/apps/welcome/welcome.html @@ -2,12 +2,6 @@ - @@ -89,21 +83,24 @@
- +
@@ -128,53 +125,62 @@
- +
@@ -199,16 +205,18 @@
- +
@@ -394,5 +402,11 @@ #{endOfBody} + diff --git a/webpack.config.js b/webpack.config.js index 55758cb..19107f3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -280,17 +280,6 @@ function getWebviewsConfig(mode, env) { ), to: path.posix.join(__dirname.replace(/\\/g, '/'), 'dist', 'webviews'), }, - { - from: path.posix.join( - __dirname.replace(/\\/g, '/'), - 'node_modules', - '@vscode', - 'webview-ui-toolkit', - 'dist', - 'toolkit.min.js', - ), - to: path.posix.join(__dirname.replace(/\\/g, '/'), 'dist', 'webviews'), - }, ], }), ]; @@ -522,6 +511,7 @@ function getHtmlPlugin(name, premium, mode, env) { chunks: [name], filename: path.join(__dirname, 'dist', 'webviews', `${name}.html`), inject: true, + scriptLoading: 'module', inlineSource: mode === 'production' ? '.css$' : undefined, minify: mode === 'production' @@ -577,10 +567,10 @@ class InlineChunkHtmlPlugin { compiler.hooks.compilation.tap('InlineChunkHtmlPlugin', compilation => { const getInlinedTagFn = tag => this.getInlinedTag(publicPath, compilation.assets, tag); - + const sortFn = (a, b) => (a.tagName === 'script' ? 1 : -1) - (b.tagName === 'script' ? 1 : -1); this.htmlPlugin.getHooks(compilation).alterAssetTagGroups.tap('InlineChunkHtmlPlugin', assets => { - assets.headTags = assets.headTags.map(getInlinedTagFn); - assets.bodyTags = assets.bodyTags.map(getInlinedTagFn); + assets.headTags = assets.headTags.map(getInlinedTagFn).sort(sortFn); + assets.bodyTags = assets.bodyTags.map(getInlinedTagFn).sort(sortFn); }); }); }