Skip to content

Commit

Permalink
set SvelteKit as external only in development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Aug 17, 2022
1 parent 47f99df commit 592f964
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/kit/test/apps/amp/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const config = {
fs: {
allow: [path.resolve('../../../src')]
}
},
ssr: {
// workaround https://github.com/vitejs/vite/pull/9296
external: process.env.NODE_ENV === 'development' ? ['@sveltejs/kit'] : undefined
}
};

Expand Down
4 changes: 4 additions & 0 deletions packages/kit/test/apps/basics/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const config = {
fs: {
allow: [path.resolve('../../../src')]
}
},
ssr: {
// workaround https://github.com/vitejs/vite/pull/9296
external: process.env.NODE_ENV === 'development' ? ['@sveltejs/kit'] : undefined
}
};

Expand Down
4 changes: 4 additions & 0 deletions packages/kit/test/apps/options-2/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const config = {
fs: {
allow: [path.resolve('../../../src')]
}
},
ssr: {
// workaround https://github.com/vitejs/vite/pull/9296
external: process.env.NODE_ENV === 'development' ? ['@sveltejs/kit'] : undefined
}
};

Expand Down
4 changes: 4 additions & 0 deletions packages/kit/test/apps/options/vite.custom.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const config = {
fs: {
allow: [path.resolve('../../../src')]
}
},
ssr: {
// workaround https://github.com/vitejs/vite/pull/9296
external: process.env.NODE_ENV === 'development' ? ['@sveltejs/kit'] : undefined
}
};

Expand Down
4 changes: 4 additions & 0 deletions packages/kit/test/apps/writes/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const config = {
fs: {
allow: [path.resolve('../../../src')]
}
},
ssr: {
// workaround https://github.com/vitejs/vite/pull/9296
external: process.env.NODE_ENV === 'development' ? ['@sveltejs/kit'] : undefined
}
};

Expand Down

0 comments on commit 592f964

Please sign in to comment.