When building with JSPM with the baseURL set to a subdirectory, if a CSS file contains @import directives, CleanCSS throws an error with the message Broken @import declaration of "path/to/imported/file.css" repeated for each import. This happens because it's using the wrong path to find the file.
When evaluating @import './a.css', CleanCSS tries to open the file project/styles/a.css instead of project/ui/styles/a.css. It's missing the ui/ portion.
I do not think the rootURL configuration option is relevant here. These are relative imports. Setting "rootURL": "ui" in jspm.config.js works around the CleanCSS error, but it causes incorrect paths for images referenced with relative URLs.
Am I doing something wrong with the configuration here? Did it work by accident in 0.1.23?
Version: 0.1.27 Last working version: 0.1.23
When building with JSPM with the baseURL set to a subdirectory, if a CSS file contains
@import
directives, CleanCSS throws an error with the messageBroken @import declaration of "path/to/imported/file.css"
repeated for each import. This happens because it's using the wrong path to find the file.Directory structure:
package.json:
index.js:
styles.css:
When evaluating
@import './a.css'
, CleanCSS tries to open the fileproject/styles/a.css
instead ofproject/ui/styles/a.css
. It's missing theui/
portion.I do not think the rootURL configuration option is relevant here. These are relative imports. Setting
"rootURL": "ui"
injspm.config.js
works around the CleanCSS error, but it causes incorrect paths for images referenced with relative URLs.Am I doing something wrong with the configuration here? Did it work by accident in 0.1.23?
Thanks for reading.