Open steveblue opened 4 years ago
Hey @steveblue!
I don't pay attention to Sass yet. It's a good question, I try to fix it in the near future.
Thanks!
Unfortunately the issue still exists. The plugin generates a .js file instead of a css when used from .html files:
<link rel="stylesheet" media="screen" href="/main.47d027ea.js" type="text/css">
My solution is not beautiful but it works. It's using a custom extension for CSS
files that will be imported to JS
.
For example: *.cssx
.parcelrc
{
"parcel-plugin-css-to-string": {
"assetType": ["cssx"]
}
}
Unfortunately I can't found how to fix this issue quickly. If you know how to fix it, please share an example, docs, article, etc... Thanks!
It seems the plugin is incompatible with css preprocessors to a degree. I am able to import scss in files just fine.
resolves to a string as in intended.
However, just adding this plugin has now broken global styling.
STEPS TO REPRODUCE:
yarn add parcel-plugin-css-to-string
index.html:
style.scss
Styling included with link tag fails to compile with
parcel
andparcel build
. Otherwise, plugin works as prescribed.