Skip to content

Commit

Permalink
don't transpile imports to requires.
Browse files Browse the repository at this point in the history
  • Loading branch information
JReinhold committed Dec 15, 2022
1 parent 9c0f315 commit 3e685f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
@@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/preset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3e685f7

Please sign in to comment.