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

Allow configure jsonPlugin #1672

Closed
pikax opened this issue Jan 23, 2021 · 0 comments
Closed

Allow configure jsonPlugin #1672

pikax opened this issue Jan 23, 2021 · 0 comments

Comments

@pikax
Copy link
Contributor

pikax commented Jan 23, 2021

Is your feature request related to a problem? Please describe.
Certain .json files I need to handle the export a different way than the one provided by default

// .json
{
  "json": "1"
}
// I need to output to: 
export default JSON.parse(`{"json":"1"}`)

Describe the solution you'd like
Allow passing specific json config to exclude certain files or to exclude the json plugin completely.

Describe alternatives you've considered
Tried use enforce: 'pre' but without success.

Additional context
When you don't need to convert the json into esm import (#1459), a simple JSON.parse(json) is enough and more performant

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant