Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 5325011

Browse files
Merge branch 'develop' into release
# Conflicts: # README.md
2 parents 5377124 + 0295887 commit 5325011

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# esbuild-sass-modules-plugin
22
A sass module loader plugin for esbuild.
33

4-
![npm package version](https://img.shields.io/static/v1?label=%40squirrelnetwork%2Fesbuild-sass-modules-plugin&message=1.0.2&color=5AA9E6&logo=npm&logoColor=FF6392)
4+
![npm package version](https://img.shields.io/static/v1?label=%40squirrelnetwork%2Fesbuild-sass-modules-plugin&message=1.0.3&color=5AA9E6&logo=npm&logoColor=FF6392)
55

66
This plugin allows .scss and .sass files to be imported as modules in javascript
77
files.
88

9+
> Note: this package is a module.
10+
911
## Basic usge:
1012

1113
```js
@@ -22,6 +24,30 @@ await esb.build(
2224
);
2325
```
2426

27+
> Note: if you see an error in console like this:
28+
> ```js
29+
> node:internal/process/esm_loader:94
30+
> internalBinding('errors').triggerUncaughtException(
31+
> ^
32+
>
33+
> Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'node_modules\lodash\fp' is not supported resolving ES modules imported from node_modules\@squirrelnetwork\esbuild-sass-modules-plugin\src\esbuild-sass-modules-plugin.class.js
34+
> Did you mean to import lodash/fp.js?
35+
> at new NodeError (node:internal/errors:371:5)
36+
> at finalizeResolution (node:internal/modules/esm/resolve:412:17)
37+
> at moduleResolve (node:internal/modules/esm/resolve:932:10)
38+
> at defaultResolve (node:internal/modules/esm/resolve:1044:11)
39+
> at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
40+
> at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
41+
> at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
42+
> at link (node:internal/modules/esm/module_job:75:36) {
43+
> code: 'ERR_UNSUPPORTED_DIR_IMPORT',
44+
> url: 'file:///.../node_modules/lodash/fp'
45+
> }
46+
> ```
47+
> Then you need to
48+
> [add the flag](https://nodejs.org/api/cli.html#cli_experimental_specifier_resolution_mode)
49+
> `--experimental-specifier-resolution=node` when running node.
50+
2551
## Documentation
2652
2753
See the [wiki](https://github.com/Squirrel-Network/esbuild-sass-modules-plugin/wiki/)

0 commit comments

Comments
 (0)