Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

add babel plugins support #59

Open
lhz516 opened this issue Sep 20, 2017 · 4 comments
Open

add babel plugins support #59

lhz516 opened this issue Sep 20, 2017 · 4 comments

Comments

@lhz516
Copy link

lhz516 commented Sep 20, 2017

Some npm packages might need babel plugins to work properly such as styled-components. When doing SSR, it needs a babel plugin to sync client and server classNames. See more

However, when I use barbatus:typescript, the .babelrc file become useless. All babel plugins won't work.

I hope babel plugins can still be supported when we use TS with barbatus:typescript

@smeijer
Copy link

smeijer commented Mar 23, 2018

This could be solved if the .ts files are run through the ecmascript builder after being processed by typescript. Effectively a double compile step. But this is how all webpack based projects handle it.

We could then preserve jsx in typescript, and handle that by babel.

@BendaCoding
Copy link

any news on this?
Im also trying to use babel-plugin-inline-import along with the ts compiler so i can seamlessly import .graphql files

@lhz516
Copy link
Author

lhz516 commented Aug 31, 2018

@BendaCoding

Maybe we don't have to use barbatus:typescript. Check this out: https://babeljs.io/docs/en/babel-preset-typescript

However I haven't tried it yet. Hopefully it works.

@smeijer
Copy link

smeijer commented Aug 31, 2018

@lhz516, MS had a nice blog post about the subject. Haven't tried it with Meteor yet.

https://blogs.msdn.microsoft.com/typescript/2018/08/27/typescript-and-babel-7/

It's also interesting to keep track on this one:

meteor/meteor-feature-requests#285 (comment)

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

3 participants