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

Add module field to package.json #2021

Closed
benmccann opened this issue Apr 20, 2021 · 2 comments · Fixed by #2143
Closed

Add module field to package.json #2021

benmccann opened this issue Apr 20, 2021 · 2 comments · Fixed by #2143
Labels
Projects

Comments

@benmccann
Copy link
Contributor

What pain point are you perceiving?.
marked does not play nicely with unbundled development tools like Snowpack, Vite, and WMR. E.g. FredKSchott/analyze-npm#9. These tools highly prefer working with ESM code, but won't discover that an ESM version is available without the module field in package.json

Describe the solution you'd like
Align the ESM and CJS versions to have the same shape (#1571 (comment)) and then add a module field to package.json

@UziTech UziTech added this to To Do in vNext via automation Jun 15, 2021
@benmccann
Copy link
Contributor Author

Actually, there is a named export called parse, so even without changing the shape, I can get this to work in SvelteKit simply by by adding the module field. However, without the module field, I need a workaround:

			optimizeDeps: {
				include: ['marked']
			},

@UziTech
Copy link
Member

UziTech commented Jul 23, 2021

If you want to create a PR we will be releasing v3 soon so any breaking changes can go into that release.

vNext automation moved this from To Do to Done Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
vNext
Done
Development

Successfully merging a pull request may close this issue.

2 participants