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

Babel plugin (jsx-control-statements) and imports from npm packages #95

Open
tomitrescak opened this issue Feb 23, 2016 · 2 comments
Open

Comments

@tomitrescak
Copy link

Dears, I am trying to port my meteor-webpack project to "pure meteor", but I am running into some issues. Would you be able to help?

  1. I cannot make "jsx-control-statements" to work. It is a babel plugin that transforms "" tag to javascript. When I specify the plugin in the .babelrc such as "plugins": ["react-require", "babel-root-slash-import", "jsx-control-statements"] it does not work, the plugin is not loaded and app if throwing errors.

[EDIT] I just learned at #89 that this is not possible, since it's ecmascript package that handles the compilation. Bummer ;( Still ,what about the next point?

  1. How can I import data from npm packages? I need to import custom css from npm package in order to make it work. In webpack I just did import "sweetalert/dist/sweetalert.css" but Meteor is complaining that the package does not exists. Yet import "sweetalert is ok, but it does not import the CSS from there.

Please, any help is kindly appreciated.

@adamdawkins
Copy link

I just saw this after asking you about this, weird timing!

Yes, I just saw that! There's a comment in #27 from arunoda that explains
the .babelrc is only for testing, so that won't help you (I found out the
hard way!)

Can't help you beyond clarifying with .babelrc doesn't work for this!
On Wed, 24 Feb 2016 at 00:17, Tomas Trescak notifications@github.com
wrote:

Dears, I am trying to port my meteor-webpack project to "pure meteor", but
I am running into some issues. Would you be able to help?

I cannot make "jsx-control-statements" to work. It is a babel plugin
that transforms "" tag to javascript. When I specify the plugin in the
.babelrc such as "plugins": ["react-require",
"babel-root-slash-import", "jsx-control-statements"] it does not work,
the plugin is not loaded and app if throwing errors.
2.

How can I import data from npm packages? I need to import custom css
from npm package in order to make it work. In webpack I just did import
"sweetalert/dist/sweetalert.css" but Meteor is complaining that the
package does not exists. Yet import "sweetalert is ok, but it does not
import the CSS from there.

Please, any help is kindly appreciated.


Reply to this email directly or view it on GitHub
#95.

@arunoda
Copy link
Collaborator

arunoda commented Feb 28, 2016

I have also found once, I can't import individual npm modules like: import "sweetalert/dist/sweetalert.css".

But I also heard that, it's fixed in the later beta.
However, I think css imports are not supported in Meteor yet.
(someone could correct me, if it is)

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

No branches or pull requests

3 participants