-
Notifications
You must be signed in to change notification settings - Fork 6
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
stop working from release 3.5.2 #27
Comments
Hi @mdellanave, it looks like you are mixing import types. Until the latest version, import assertions were not working in Rollup 4, so it was originally working due to ignoring the assert syntax which worked in this plugin with Rollup 3. When using It sounds like you are intending to only have the css imported so it gets included in a bundle rather than a css module. So everything should work if you change your import to be: Let me know if that works or not. |
Hello. I have a similar problem. I reversed the update and the problem went away. Revert: bavix/uuid-ui#198 |
@rez1dent3, are you utilizing the assertion syntax as well or are you using plain imports like |
Yes, but I tried using |
when using the assert (or with) syntax, the css being imported that way, will not be included in the css bundle, instead it is included in the js bundle as such: ex: Are the imports that look like |
Here is an example I currently have working: rollup.config.mjs import css from "rollup-plugin-import-css";
export default {
input: "src/index.js",
output: [
{ file: "dist/index.js", format: "esm" },
],
plugins: [
css({ minify: true, output: "bundle.css" })
],
}; src/index.js import "./index.css"; src/index.css .red {
color: red;
} This correctly outputs the bundle.css file, if i do any other kind of css import, it will not be included in the bundle. |
I updated the plugin @babel/plugin-syntax-import-attributes to version 7.25.6 and it worked. Hmm.. Thanks for the help. |
Got it, sounds like it may have been a conflict with the import attributes plugin and rollups native support for it then. |
Yes, it is possible. Thanks for the quick reply. |
When I said that the problem was in the plugin @babel/plugin-syntax-import-attributes, I simply forgot to update your package. I checked on version 3.5.1 :there should be a picture of harold here: Revert revert: bavix/uuid-ui#203 My imports: import '@creativebulma/bulma-tooltip/dist/bulma-tooltip.css'
import 'bulma/css/bulma.css'
import './app.css'
//...
import "@theme-toggles/react/css/Expand.css" |
I think the problem is here: |
You are right @rez1dent3, this is a result of the css minifier changes, this is unrelated to this issue then, the css is being bundled where this issue was opened regarding the css not being bundled in the output. Would you mind opening another issue regarding the css minification changes? |
Just to reference this again since the discussion here went into a different issue, In order to resolve the original problem, please remove the assert syntax and use a plain import like
|
Just installed the 3.5.3 versione and removed the assert syntax and it worked! |
@mdellanave, This is related to #28, there was a minification change introduced in order to support custom properties in attribute selectors and it seems to have broken many cases where a colon is present. I will be working on a fix for this today. |
Closing this issue since the original problem is resolved and the new problem is the same as #28 |
Hey, I'm using this plugin to rollup ckeditor files.
Since the release of the 3.5.2 version the plugin do not export the css as in the previous version.
my rollup dep
my main.js contains this
this is my rollup task
As I said, if I run it with 3.5.1 version the file custom-ckeditor.min.css is going to be created, but not with the latest version 3.5.2 published on npm.
Am I missing something?
The text was updated successfully, but these errors were encountered: