iam-medvedev / esbuild-plugin-less

esbuild plugin for less files
https://npmjs.com/package/esbuild-plugin-less
Do What The F*ck You Want To Public License
43 stars 12 forks source link

Types could not be resolved when using `"moduleResolution: "Bundler"` in tsconfig. #99

Closed thanawatarista closed 1 year ago

thanawatarista commented 1 year ago

Expected Behavior

Types to be resolved.

Actual Behavior

The types for this package could not be resolved when using the "moduleResolution": "bundler" in your TSConfig.

See: image

This is the issue:

The fix is to change this package's package.json, line: https://github.com/iam-medvedev/esbuild-plugin-less/blob/main/package.json#L30 to:

  "exports": {
    "import": {
      "default": "./build/esm.mjs",
      "types": "./build/index.d.ts"
    },
    "require": {
     "default": "./build/cjs.js",
     "types": "./build/index.d.ts"
    }
  },

Versions

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.2.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

iam-medvedev commented 1 year ago

Thank you @thanawatarista!

thanawatarista commented 1 year ago

Thanks for fixing this so quickly @iam-medvedev !