webpack sideEffects list not work in server, But it's ok in my local machine

89 Views Asked by At

I am trying to use Tree Shaking in my project. And some code had side effects, So I set the under Array. It work well in my local,But It not work in my romate server,It will shaked all file.

{
 "name": "my demo",
  "sideEffects": [
   "**/extension/*.js"
 ]
}

Only I set the sideEffects Array like ["*.js"],it will not shake my file. But It doesn't make sense.

{
 "name": "my demo",
  "sideEffects": [
   "*.js"
 ]
}

it can't match the file ? or it's the micromatch err? I have no idea abuot this issue

Thanks all

0

There are 0 best solutions below