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
Processes the input CSS `sourceString`, looking for dependencies such as `@import` or `:import`. Any localisation will happen by prefixing a sanitised version of `sourcePath` When dependencies are found, it will ask the `pathFetcher` for each dependency, resolve & inline any imports, and return the following object:
17
+
Processes the input CSS `sourceString`, looking for dependencies such as `@import` or `:import`. Any localisation will happen by prefixing a sanitised version of `sourcePath` When dependencies are found, it will ask the `pathFetcher` for each dependency, asynchronously resolve & inline any imports, and return the following object:
18
+
19
+
-`injectableSource`: the final, merged CSS file without `@import` or `:import` statements
20
+
-`exportTokens`: the mapping from local name to scoped name, as described in the file's `:export` block
21
+
22
+
These should map nicely to what your build-tool-specific loader needs to do its job.
23
+
24
+
25
+
## Sync API
26
+
27
+
The sync API is available at `css-modules-loader-core/sync`
Processes the input CSS `sourceString`, looking for dependencies such as `@import` or `:import`. Any localisation will happen by prefixing a sanitised version of `sourcePath` When dependencies are found, it will ask the `pathFetcher` for each dependency, synchronously resolve & inline any imports, and return the following object:
16
37
17
38
-`injectableSource`: the final, merged CSS file without `@import` or `:import` statements
18
39
-`exportTokens`: the mapping from local name to scoped name, as described in the file's `:export` block
19
40
20
41
These should map nicely to what your build-tool-specific loader needs to do its job.
21
42
43
+
22
44
### new Core([plugins])
23
45
24
46
The default set of plugins is [[postcss-modules-local-by-default](https://github.com/css-modules/postcss-modules-local-by-default), [postcss-modules-extract-imports](https://github.com/css-modules/postcss-modules-extract-imports), [postcss-modules-scope](https://github.com/css-modules/postcss-modules-scope)] (i.e. the CSS Modules specification). This can override which PostCSS plugins you wish to execute, e.g.
0 commit comments