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

Output JavaScript source by default, rather than JSON #27

Merged
merged 4 commits into from
Sep 6, 2020
Merged

Conversation

eemeli
Copy link
Owner

@eemeli eemeli commented Apr 18, 2020

At the moment, a Webpack rule using this loader needs to specify type: 'json' to note that its output is JSON, rather than the default expectation of JavaScript source.

This PR switches the loader's output to be stringified JavaScript, and adds a new option asJSON to restore the previous JSON output.

Feature-wise, this adds proper support for repeated references, as well as BigInt, Buffer, Date, Map, Set and practically any other ECMAScript value types that a YAML schema may produce.

Circular references result in undefined for the inner reference; that's currently blocked by blakeembrey/javascript-stringify#34.

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

Successfully merging this pull request may close these issues.

1 participant