Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generated ESM, revamp build system #113

Merged
merged 19 commits into from
Jul 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/plugins/vite-svelte-csf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { fileURLToPath } from 'url';
import { getNameFromFilename } from '../parser/svelte-stories-loader.js';
import { readFileSync } from 'fs';

const parser = fileURLToPath(new URL('../parser/collect-stories.js', import.meta.url));
const parser = fileURLToPath(new URL('../parser/collect-stories.js', import.meta.url)).replace(/\\/g, "\\\\");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend making this very obvious why this is the way it is perhaps with a clear code-comment?, and possibly even ensure this continues working with a unit-test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added handling across any dynamic imports in fa5505b.

@ilsubyeega don't know if you'd be able to help with a test?

Copy link
Contributor

@ilsubyeega ilsubyeega Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can say the current branch works on my machine (win11-x64) with yarn test and storybook live view.
However, I'm uncertain whether the changes to presets directory are working or not.

Also, I'm not sure about creating other test tasks for this.


export default function csfPlugin(svelteOptions) {
const include = /\.stories\.svelte$/;
Expand Down