Skip to content

Commit

Permalink
Merge pull request #84 from storybookjs/fix-esm-support
Browse files Browse the repository at this point in the history
Support newest ESM-only `@sveltejs/vite-plugin`
  • Loading branch information
JReinhold authored Dec 16, 2022
2 parents b1e3595 + 3e685f7 commit ad8c44f
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 ad8c44f

Please sign in to comment.