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

JSON loader uses commonjs #344

Closed
LarsDenBakker opened this issue Aug 24, 2020 · 3 comments
Closed

JSON loader uses commonjs #344

LarsDenBakker opened this issue Aug 24, 2020 · 3 comments

Comments

@LarsDenBakker
Copy link

When using the JSON loader to transform a single file, the output is commonjs format. Setting the format option has no effect, I think that's only used when bundling.

See https://repl.it/repls/SuburbanMediumblueLinuxkernel#index.js for a reproduction.

@evanw
Copy link
Owner

evanw commented Sep 3, 2020

I think this looks like a duplicate of #109 to me.

@LarsDenBakker
Copy link
Author

Being able to specify the format would solve this, but it seems like it will be some work still.

But I was expecting that loaders for non-js files would return an es module.

@evanw
Copy link
Owner

evanw commented Sep 7, 2020

Closing as a duplicate of #109 (which was just implemented).

@evanw evanw closed this as completed Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants