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

Parcel Build For ES Modules & Inline CSS #1599

Closed
rodoabad opened this issue Jun 22, 2018 · 1 comment
Closed

Parcel Build For ES Modules & Inline CSS #1599

rodoabad opened this issue Jun 22, 2018 · 1 comment

Comments

@rodoabad
Copy link

rodoabad commented Jun 22, 2018

❔ Question

I'm wondering if there's a way for Parcel to build the package for ES modules. Is this more of a Babel issue when building?

Additional question.

Can I inline the CSS being produced? Right now when I do npx parcel build, it creates a separate CSS file. I'd like it to be inline.

🔦 Context

After reading the long discussion at webpack/webpack#1979. I would like to transpile everything sans ES Modules so that I can take advantage of the module property in package.json.

It seems to be that the module property is supported by Parcel (I could be wrong here)? Since I have it in a test module and when I import a file with a module defined it tries to use it.

💻 Code Sample

🌍 Your Environment

Software Version(s)
Parcel 1.9.2
Node 8
npm/Yarn npm
Operating System Mac

🔖 : References

babel/babel#6328
webpack/webpack#1979
#559

@rodoabad rodoabad changed the title Parcel Build For ES Modules Parcel Build For ES Modules & Inline CSS Jun 22, 2018
@devongovett
Copy link
Member

devongovett commented Nov 14, 2019

ES module output is supported in v2. Inline CSS can be implemented with #3726.

import cssText from 'bundle-text:./style.css'

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

No branches or pull requests

4 participants