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

emotion interacts poorly with babel-cli --out-dir #167

Closed
ChristopherBiscardi opened this issue Jul 20, 2017 · 5 comments
Closed

emotion interacts poorly with babel-cli --out-dir #167

ChristopherBiscardi opened this issue Jul 20, 2017 · 5 comments

Comments

@ChristopherBiscardi
Copy link
Member

  • emotion version: 6.0.3

Relevant code: https://github.com/ChristopherBiscardi/emotion-babel-bug

What you did:

Run babel src --out-dir lib

What happened:

*.emotion.css files are written in src, not in lib.

Reproduction:

git clone [email protected]:ChristopherBiscardi/emotion-babel-bug.git
cd emotion-babel-bug && yarn
yarn run build

Problem description:

emotion/src/babel writes this file out as a relative path.

Suggested solution:

If babel allows access to an --out-dir configuration in the babel transformation, then use that to prefix the filename.

@tkh44 tkh44 added bug and removed bug labels Jul 20, 2017
@emmatown
Copy link
Member

It looks like this isn't possible.

https://github.com/babel/babel/blob/7.0/packages/babel-cli/src/babel/index.js#L204-L212

@ChristopherBiscardi
Copy link
Member Author

I'm just mving the css files out on build right now. What do you think about adding an outputDir type option in the babel config for emotion?

@tkh44
Copy link
Member

tkh44 commented Jul 25, 2017

@ChristopherBiscardi can you open up a formal issue for that feature request please? I like that idea and I don't want it to get lost in the shuffle.

@ChristopherBiscardi
Copy link
Member Author

@tkh44 formally added in #180

@tkh44
Copy link
Member

tkh44 commented Jul 25, 2017

Thank you @ChristopherBiscardi. I'm going to close this one.

@tkh44 tkh44 closed this as completed Jul 25, 2017
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