-
-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Describe the bug
I am encountering several warnings related to imports being ignored because they are marked as having no side effects (sideEffects: false) in their respective package.json files. This issue is happening in the following dependencies:
@universal-middleware/hono@mantine/core@mantine/hooks@radix-ui/react-icons
`[WARNING] Ignoring this import because "../../node_modules/.pnpm/@universal-middleware+hono@0.4.6_@cloudflare+workers-types@4.20250317.0_@hattip[email protected][email protected]/node_modules/@universal-middleware/hono/dist/index.js" was marked as having no side effects [ignored-bare-import]
../server/cloudflare-worker.mjs:15:7:
15 │ import "@universal-middleware/hono";
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"sideEffects" is false in the enclosing "package.json" file:
../../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]/node_modules/@universal-middleware/hono/package.json:32:2:
32 │ "sideEffects": false,
╵ ~~~~~~~~~~~~~
`
` [WARNING] Ignoring this import because "../../node_modules/.pnpm/@Mantine+core@7.17.2_@mantine[email protected]_react@19.0.0__@types[email protected]_react-dom_092886b1b535cdd8d6dd28ee8a58dc01/node_modules/@mantine/core/esm/index.mjs" was marked as having no side effects [ignored-bare-import]
../server/entries/pages_-admin-panel-_pages_admin-panel.mjs:16:7:
16 │ import "@mantine/core";
╵ ~~~~~~~~~~~~~~~
It was excluded from the "sideEffects" array in the enclosing "package.json" file:
../../node_modules/.pnpm/@[email protected]_@[email protected][email protected]__@[email protected]_react-dom_092886b1b535cdd8d6dd28ee8a58dc01/node_modules/@mantine/core/package.json:19:2:
19 │ "sideEffects": [
╵ ~~~~~~~~~~~~~`
etc...
Expected behavior
Impact
These warnings do not seem to break the application, but they could affect tree shaking and optimizations. It would be great if these modules could be marked as having side effects or be excluded from the sideEffects array where appropriate.
Possible Solution
Consider updating the sideEffects field in the package.json of these modules to true or explicitly marking them as having side effects to prevent the bundler from ignoring them.
Additional context
- OS: Ubuntu (latest version)
- PC: Aspire A315-23
- Package Manager:
pnpm - Stack:
- Cloudflare Workers (via Wrangler)
- Mantine
- Prettier, ESLint
- Sentry
- React
