Skip to content

Commit 4d662de

Browse files
committed
feat: try import cjs config
1 parent 3dd5ad3 commit 4d662de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite-plugin-svelte/src/utils/load-svelte-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function loadSvelteConfig(
2727
if (configFile) {
2828
let err;
2929
// try to use dynamic import for svelte.config.js first
30-
if (configFile.endsWith('.js') || configFile.endsWith('.mjs')) {
30+
if (configFile.endsWith('.js') || configFile.endsWith('.mjs') || configFile.endsWith('.cjs')) {
3131
try {
3232
const result = await dynamicImportDefault(pathToFileURL(configFile).href);
3333
if (result != null) {

0 commit comments

Comments
 (0)