Parcel throws an error when adding a new file whilst using glob imports in css files
Out of the box
Reloads watcher when new file is added in the globbed css import
Parcel throws an error saying file not found
Error: ENOENT: no such file or directory
Folder Structure:
styles/one.css
styles/two.css
styles.three.css
main.css
Import declaration in main.css:
@import './styles/*.css';
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.12.3
| Node | 12.0.0
| npm/Yarn | 6.9.0/1.15.2
| Operating System | osx 10.14.4
This error comes with sass and scss too.
Got an index.sass file and doing imports like:
// Import templates
@import '../../template/**/*.sass'
Getting error:
Error: File to import not found or unreadable
that would help allot. Ability to import css|scss files with glob :calendar:
I am running into this too but with .tsx files.
I just proposed a fix. I'm not sure what further steps are required re: testing, and I don't have a lot of time/energy for that, but I found the bug.
This should probably get the label Watcher.
I am running into #2749 when I delete a file in VS Code, and this bug when I add a file in VS Code. So basically glob watching is broken on adding and deleting files.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Most helpful comment
I just proposed a fix. I'm not sure what further steps are required re: testing, and I don't have a lot of time/energy for that, but I found the bug.