Skip to content

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.

2 participants