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

Automatically edit .babelrc with module-resolver #1

Open
Fr33maan opened this issue Sep 5, 2017 · 1 comment
Open

Automatically edit .babelrc with module-resolver #1

Fr33maan opened this issue Sep 5, 2017 · 1 comment

Comments

@Fr33maan
Copy link
Owner

Fr33maan commented Sep 5, 2017

How to do it ? I guess it's in ignite code itself ?

@skellock
Copy link

skellock commented Sep 5, 2017

In your boilerplate.js file. Around here

You can read the file in as json, manipulate it (in your case add a plugin), then save it back out.

const babelrc = filesystem.read('.babelrc', 'json')
babelrc.plugins = babelrc.plugins || []
babelrc.plugins.push('module-resolver')
filesystem.write('.babelrc', babelrc, { jsonIndent: 2 })

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

No branches or pull requests

2 participants