Comments (4)
Added a PR for caching which should also help with performance.
from postcss-import.
I have a commit here you can cherry-pick to get started. Unfortunately, that code makes the ignore
test fail and I can't yet figure out why. I think I've exhausted my willingness to work on this issue, but feel free to take that commit and do what you will with it.
Also, I noticed the use of fs.existsSync
in this plugin's code. I want to point out the fact that this will be deprecated along with the asynchronous version, fs.exists
. There's also another comment in the docs that states:
In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to fs.exists() and fs.open(). Just open the file and handle the error when it's not there.
fs.exists() will be deprecated.
Maybe the more graceful solution is to just try opening the files and throw any errors that come up.
from postcss-import.
6.1.1 has an async
option to enable postcss async use, so we might use it to detect async mode and use async fs read. Should not be a big deal from here. Maybe we might use denodeify to transform fs.readFile to a promise.
from postcss-import.
I guess we can close, right @TrySound ?
from postcss-import.
Related Issues (20)
- Issue with `@layer`s HOT 12
- Plugin is stripping the layer off of a remote url import HOT 1
- Incorrect media query concats HOT 8
- Mention postcss-import-url in docs? HOT 3
- Use the dedicated PostCSS API for errors HOT 2
- Document that all forms of `url` are supported
- Plugins docs HOT 5
- Not able to use postcss-import. Giving error ->Unable to resolve @import "variables.css" HOT 1
- Failed to find file HOT 5
- How to deal with SCSS syntax ? HOT 12
- import inside a selector HOT 1
- Supports at rule not working
- Ignored imports cause re-ordering of CSS HOT 2
- URL's with a fragment or query aren't skipped and give a file not found error HOT 1
- Ignore comments for "postcss-import: `@charset` must precede all other statements" HOT 2
- Drop old Node version support
- Fails with `postcss` 8.4.33, `original.line and original.column are not numbers` HOT 2
- Emitted `@media` AtRules are invalid HOT 4
- Default Imports HOT 3
- Support a way to process a URL with fragments HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postcss-import.