oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.23k stars 2.77k forks source link

wildcard sideEffects are not supported yet #5241

Open rikgirbes opened 1 year ago

rikgirbes commented 1 year ago

What version of Bun is running?

1.0.1+31aec4ebe325982fc0ef27498984b0ad9969162b

What platform is your computer?

Darwin 22.5.0 x86_64 i386

What steps can reproduce the bug?

package.json with interactjs installed.

Index file that references interactjs.

Running bun build ./src/index.ts --outdir ./public/dist --splitting --sourcemap=inline

What is the expected behavior?

Bundle without any warnings.

What do you see instead?

warn: wildcard sideEffects are not supported yet, which means this package will be deoptimized

    "**/index.js",
    ^
/-----/node_modules/interactjs/package.json:44:5 896

Additional information

Looking into interactjs/package.json, the contents this warning is referring to:

"sideEffects": [
  "**/index.js",
  "**/index.prod.js"
],
Ev357 commented 9 months ago

I have a similar issue:

[93ms] bundle 120 modules


- `package.json`:
```json
"sideEffects": [
  "./es/common.js",
  "./lib/common.js",
  "*.css",
  "*.scss"
],
HongxuanG commented 6 months ago

similar

ohroy commented 2 weeks ago

any news ?