-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
This issue appears only on Windows, likely due to the way the plugin //example.com/... as a local file path instead of an external resource. The plugin then tries to resolve and read the URL as if it were a file, causing Rollup to freeze indefinitely.
🛠 Steps to Reproduce:
Add the following to a CSS file:
@font-face {
font-family: 'Open Sans';
src: url("//example.com/fonts/open-sans.woff") format("woff");
}
Use rollup-plugin-styles in rollup.config.js:
import styles from 'rollup-plugin-styles'; // 4.0.0
export default {
input: 'index.js',
output: { file: 'dist/bundle.js', format: 'es' },
plugins: [styles()]
};
package.json
...
"scripts": {
"dev": "rollup -c"
}
✅ Expected Behavior:
The plugin should not attempt to resolve //example.com/... as a local file.
It should leave the URL unchanged in CSS.
As far as I debugged this, it happens here:
rollup-plugin-styles/src/loaders/index.ts
Line 66 in ca9879d
| payload = await workQueue.add(loader.process.bind(ctx, payload)); |
when a
name equals to postcss. You may just set a breakpoint at that exact line and see for yourself. After this it will just hang indefinitely.Metadata
Metadata
Assignees
Labels
No labels