You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_When importing a module, it will looks for `index.css` or file referenced in
10
-
`package.json` in the `style`field._
16
+
`package.json` in the `style`or `main` fields._
11
17
You can also provide manually multiples paths where to look at.
12
18
13
19
**Notes:**
14
20
15
-
-**This plugin should probably be used as the first plugin of your list. This way, other plugins will work on the AST as if there were only a single file to process, and will probably work as you can expect**.
16
-
- This plugin works great with [postcss-url](https://github.com/postcss/postcss-url) plugin,
17
-
which will allow you to adjust assets `url()` (or even inline them) after inlining imported files.
18
-
- In order to optimize output, **this plugin will only import a file once** on a given scope (root, media query...).
19
-
Tests are made from the path & the content of imported files (using a hash table).
21
+
-**This plugin should probably be used as the first plugin of your list.
22
+
This way, other plugins will work on the AST as if there were only a single file
23
+
to process, and will probably work as you can expect**.
which will allow you to adjust assets `url()` (or even inline them) after
27
+
inlining imported files.
28
+
- In order to optimize output, **this plugin will only import a file once** on
29
+
a given scope (root, media query...).
30
+
Tests are made from the path & the content of imported files (using a hash
31
+
table).
20
32
If this behavior is not what you want, look at `skipDuplicates` option
21
33
22
34
## Installation
@@ -27,7 +39,9 @@ $ npm install postcss-import
27
39
28
40
## Usage
29
41
30
-
If your stylesheets are not in the same place where you run postcss (`process.cwd()`), you will need to use `from` option to make relative imports work from input dirname.
42
+
If your stylesheets are not in the same place where you run postcss
43
+
(`process.cwd()`), you will need to use `from` option to make relative imports
44
+
work from input dirname.
31
45
32
46
```js
33
47
// dependencies
@@ -55,7 +69,7 @@ postcss()
55
69
Using this `input.css`:
56
70
57
71
```css
58
-
/* can consume `node_modules`, `web_modules`, `bower_components` or local modules */
72
+
/* can consume `node_modules`, `web_modules` or local modules */
0 commit comments