-
-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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:
> [email protected] build
> grunt build --plugins=remove_button,restore_on_backspace
... snip uninteresting parts ...
> [email protected] 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
- OS: macOS 15.5
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working