-
Notifications
You must be signed in to change notification settings - Fork 33
Document plugin / preset workflows #6
Comments
+1 for seeing the "JSX for React" documentation. I'm trying to use the SystemJS plugin-babel with React, but can't see how to configure it correctly. I'm not using JSPM, by the way, so is that even possible? This is as far as I got: https://github.com/brownieboy/react-systemjs-babelplugin-example I managed to get it transpiling ES2015 (i.e. no React) here https://github.com/brownieboy/systemjs-babelplugin-example. |
Regarding JSX & React, It could be mentioned that to avoid loading 300 JS files in the browser, jspm 0.17(beta) can do a bundle for example of the following contents, separate from your application code:
But it needs to be imported with |
+1 for custom plugins. For example how would I use the |
I'd love to know how to use the |
It's worth using jspm for these cases ( |
@guybedford How would we add the transform-decorators-legacy plugin? |
@EisenbergEffect this can be done via:
then adding to the configuration file: babelOptions: {
plugins: ['babel-plugin-transform-decorators-legacy']
} |
I'm interested to see how I would set this up without using jspm. |
@EisenbergEffect one approach that can work here (although isn't really a good idea) is to use jspm to create a build of the plugin (although that will then suck in all the parts of Babel itself that it needs). So you can do: jspm build babel-plugin-transform-decorators-legacy --format amd decorators-plugin-build.js And then change the babelOptions to reference that file to use decorators: babelOptions: {
plugins: ['decorators-plugin-build.js']
} That build file can then work in non-jspm SystemJS projects. |
Why would it suck in other parts of babel @guybedford? |
I wasted a day here. |
@super2457 sorry to hear that. You can use |
We should document how to use:
The text was updated successfully, but these errors were encountered: