fix: Externalize app config during dependency optimization (#833)

This commit is contained in:
Aaron
2024-07-21 08:37:09 -05:00
committed by GitHub
parent 88a1244ca9
commit 069bd6c435
@@ -13,6 +13,15 @@ export function resolveAppConfig(config: ResolvedConfig): vite.Plugin {
return {
name: 'wxt:resolve-app-config',
config() {
return {
optimizeDeps: {
// Prevent ESBuild from attempting to resolve the virtual module
// while optimizing WXT.
exclude: [virtualModuleId],
},
};
},
async resolveId(id) {
if (id !== virtualModuleId) return;