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

Add outputDir config option to emotion/babel #180

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

Add outputDir config option to emotion/babel #180

ChristopherBiscardi opened this issue Jul 25, 2017 · 5 comments

Comments

@ChristopherBiscardi
Copy link
Member

As per #167, I'm using babel-cli to compile packages down into targeted browser ranges and es* versions. Since we can not access the --out-dir config option from babel-cli in babel plugins, the next best option would be to allow an option that could be used as such:

{
  "env": {
    "es6": {
      "plugins": [
        ["emotion/babel", {outputDir: "es6"}]
      ]
    }
  }
}

We could then prepend this directory to the output filename when the file is written and npm scripts could use it as such, with all files being put in the right place:

  "scripts": {
    "build:es6": "BABEL_ENV=es6 babel src --out-dir es6"
  },
@vladnicula
Copy link

Any status on this?

I stumbled upon emotion when researching css in js frameworks and emotion looks the most promising (in terms of package size, dependencies and features).

This static extraction is crucial to my production build process.

@tkh44
Copy link
Member

tkh44 commented Oct 12, 2017

@vladnicula are you doing server side rendering or client only rendering?

@vladnicula
Copy link

@tkh44 I'm looking to do both. The current project I'm working on is only using client side rendering.

Would be nice to have support for both in the end.

Btw, opened this #396, it works for my client side project and for my server side bundling in combination with weback extract text plugin. Could not write a proper test because the fs tests are fishy.

@tkh44
Copy link
Member

tkh44 commented Oct 13, 2017

I left some comments that may help you out.

@wardpeet wardpeet mentioned this issue Mar 2, 2018
3 tasks
@emmatown
Copy link
Member

emmatown commented May 8, 2018

Closed via #583

@emmatown emmatown closed this as completed May 8, 2018
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

4 participants