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
> file.ts:1:7: warning: Ignoring this import because "node_modules/typed-query-selector/shim.d.ts" was marked as having no side effects
1 │ import 'typed-query-selector';
╵ ~~~~~~~~~~~~~~~~~~~~~~
node_modules/typed-query-selector/package.json:13:2: note: "sideEffects" is false in the enclosing "package.json" file
13 │ "sideEffects": false,
╵ ~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
I believe this warning is for preventing people from incorrectly marking a package as no side-effect when it actually has. Normally the import "xxx" statement is used for side effects, like importing from core-js. Esbuild can not ignore this statement like other import types because when you write import "xxx", you expect something happen globally (but this thing happens in types world, so esbuild don't know).
One possible solution is putting this package in the types field in tsconfig.json.
https://github.com/g-plane/typed-query-selector is a type-only package, it's normal for it to be ignored (related: #1525), but it should not cause a warning.
Repro
Expected output
No error
Current output
The text was updated successfully, but these errors were encountered: