diff --git a/.babelrc.js b/.babelrc.js index b155663..3806668 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -1,5 +1,8 @@ module.exports = { - presets: [['@babel/preset-env', { targets: { node: '16' } }], '@babel/preset-typescript'], + presets: [ + ['@babel/preset-env', { targets: { node: '16' }, modules: false }], + '@babel/preset-typescript', + ], plugins: ['@babel/plugin-transform-runtime'], env: { esm: { diff --git a/src/preset/index.js b/src/preset/index.js index 359823d..5ae892e 100644 --- a/src/preset/index.js +++ b/src/preset/index.js @@ -41,7 +41,7 @@ export async function viteFinal(config, options) { } } - const { default: svelteCsfPlugin } = await import('../plugins/vite-svelte-csf'); + const svelteCsfPlugin = (await import('../plugins/vite-svelte-csf.js')).default.default; plugins.push(svelteCsfPlugin(svelteConfig)); return {