Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

json files with no validKeys incompatible with rollup 0.37.0 #19

Closed
btakita opened this issue Dec 14, 2016 · 2 comments
Closed

json files with no validKeys incompatible with rollup 0.37.0 #19

btakita opened this issue Dec 14, 2016 · 2 comments

Comments

@btakita
Copy link
Contributor

btakita commented Dec 14, 2016

ExportDefaultDeclaration expects export default to be at the beginning of the string.

https://github.com/rollup/rollup/blob/8466b4ce56415f27687842b3177138929efee62c/src/ast/nodes/ExportDefaultDeclaration.js#L56

Either we need to .trim() the string or guard against namedExports being empty causing an empty first line at:

https://github.com/rollup/rollup-plugin-json/blob/master/src/index.js#L147

@kzc
Copy link

kzc commented Dec 15, 2016

See also: rollup/rollup#1152

@btakita
Copy link
Contributor Author

btakita commented Dec 15, 2016

That works for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants