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

resolveJsonModule with --module es2015 #26020

Closed
domoritz opened this issue Jul 27, 2018 · 6 comments
Closed

resolveJsonModule with --module es2015 #26020

domoritz opened this issue Jul 27, 2018 · 6 comments
Assignees
Labels
Duplicate An existing issue was already created Fixed A PR has been merged for this issue

Comments

@domoritz
Copy link

domoritz commented Jul 27, 2018

Related Issues

#25755, #24588

Examples

I'm using Typescript with rollup with https://github.com/rollup/rollup-plugin-json and with TS 2.9 everything worked fine. TS 3 disables JSON modules with everything other than commonjs modules. Could this be changed for es2015 modules?

@mhegazy
Copy link
Contributor

mhegazy commented Jul 27, 2018

Looks like a duplicate of #25755

@mhegazy mhegazy added the Duplicate An existing issue was already created label Jul 27, 2018
@domoritz
Copy link
Author

I filed a separate issue (and linked to the original one) since the other issue talks about amd.

@ZSkycat
Copy link

ZSkycat commented Jul 31, 2018

--module esnext
I use webpack and I also have this requirement.

@gamedevsam
Copy link

Me as well, I just want to TypeScript to load JSON and provide type intelligence to VSCode. That way TypeScript can enforce any code access of JSON object is valid.

@kitsonk
Copy link
Contributor

kitsonk commented Aug 18, 2018

@gamedevsam the workaround would be to target CommonJS in the tsconfig.json but whatever your build pipeline/bundler is that handles JSON, to ensure that it emits the TypeScript in the module format you prefer.

@domoritz
Copy link
Author

domoritz commented Sep 7, 2018

This is fixed in master.

@domoritz domoritz closed this as completed Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

6 participants