chore: Use deps.neverBundle instead of external

tsdown has deprecated `external` in favor of `deps.neverBundle`.
This commit is contained in:
Aaron
2026-03-28 11:49:11 -05:00
parent 6621aaf877
commit 8f71e174cb
2 changed files with 14 additions and 8 deletions
+3 -1
View File
@@ -10,7 +10,9 @@ export default defineConfig({
'./modules/analytics/providers/google-analytics-4.ts',
'providers/umami': './modules/analytics/providers/umami.ts',
},
external: ['#analytics'],
deps: {
neverBundle: ['#analytics'],
},
define: {
'process.env.NPM': 'true',
},
+11 -7
View File
@@ -21,7 +21,9 @@ export default defineConfig([
'src/cli/index.ts',
],
unbundle: true,
external: ['wxt/browser', 'virtual:app-config'],
deps: {
neverBundle: ['wxt/browser', 'virtual:app-config'],
},
copy: [
// If tsdown bundles this file, it removes the triple-slash reference, so
// we need to copy it into the out dir manually instead of building it.
@@ -40,12 +42,14 @@ export default defineConfig([
(moduleName): UserConfig => ({
entry: `src/virtual/${moduleName}.ts`,
outDir: 'dist/virtual',
external: [
...virtualEntrypointModuleNames.map((name) => `virtual:user-${name}`),
'virtual:wxt-plugins',
'virtual:app-config',
...Object.keys(pkgJson.exports).map((path) => 'wxt' + path.slice(1)), // ./utils/storage => wxt/utils/storage
],
deps: {
neverBundle: [
...virtualEntrypointModuleNames.map((name) => `virtual:user-${name}`),
'virtual:wxt-plugins',
'virtual:app-config',
...Object.keys(pkgJson.exports).map((path) => 'wxt' + path.slice(1)), // ./utils/storage => wxt/utils/storage
],
},
}),
),
]);