-
Notifications
You must be signed in to change notification settings - Fork 34
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 custom Babel config #36
Comments
Sounds reasonable. A thing is that you almost certainly do not want Any chance you have a sample project handy that could be included into the test suite? |
Yeah, likely no presets. I was converting Preact's TodoMVC. |
Cool. I will take a look tonight. Did you have to make any changes to the repo or just run splittable on some input? |
Cool, thanks. I just ran Splittable. Normally I spin up Splittable without any issues. But this repo uses more ES6/7 features than I traditionally do. |
I have this working splittable({
modules: [
'./src/index',
],
writeTo: './sample/out/',
babel: {
plugins: [
'transform-object-rest-spread',
['transform-react-jsx', { pragma:'h' }]
],
}
}) |
Is that doable right now? Or did it rely on changes you made to Splittable locally? |
I made local changes. But they seem to work. Will need some time to clean up and write tests. |
Cool. Thanks @cramforce ! |
PR in #41 Needs some final cleanup. |
@cramforce Thanks! |
@lukeed Please give it a shot. Published as |
In stage 1 of the
babelify
transforms, we should be able to inject custom plugins. (and perhaps presets?).For instance, decorators, async/await, and other ES7 goodies are untouchable right now. Doing this lets Babel compile is down to ES5 or ES6 before GCC sees it.
Some very common babel plugins that were missing & broke my build:
babel-plugin-transform-class-properties
babel-plugin-transform-decorators-legacy
babel-preset-stage-0
The simplest of errors resulted in an unsupported spread operator:
The text was updated successfully, but these errors were encountered: