Bug description
Hi, I was about to create a custom plugin.
Trying to build a custom build (tom-select.custom.js) fails with the following error:
> tom-select@2.4.3 build
> grunt build --plugins=remove_button,restore_on_backspace
... snip uninteresting parts ...
> tom-select@2.4.3 build:js:esm
> tsc -p .config/tsconfig.esm.json
src/tom-select.custom.ts(2,23): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './tom-select.js'?
Warning: Command failed: npm run build:js
Use --force to continue.
Aborted due to warnings.
The issue is that the generated tom-select.custom.ts imports ./tom-select without the .js extension.
It's an easy fix and I can create a PR if interested.
Expected behavior
Running npm build with the --plugins option should complete successfully without TypeScript errors.
Steps to reproduce
- Clone the repo, get on master branch
- Run
npm install
- Run
npm run build -- --plugins=remove_button,restore_on_backspace
- See error:
TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'
Additional context
Bug description
Hi, I was about to create a custom plugin.
Trying to build a custom build (
tom-select.custom.js) fails with the following error:The issue is that the generated
tom-select.custom.tsimports./tom-selectwithout the .js extension.It's an easy fix and I can create a PR if interested.
Expected behavior
Running
npm buildwith the--pluginsoption should complete successfully without TypeScript errors.Steps to reproduce
npm installnpm run build -- --plugins=remove_button,restore_on_backspaceTS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'Additional context