parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.44k stars 2.27k forks source link

resolve is not working if the resolved name/package is installed #3230

Closed damianobarbati closed 5 years ago

damianobarbati commented 5 years ago

In this project I'm using preact but I had to install react package to have eslint-plugin-react and eslint-plugin-react-hooks working.

Relevant config:

    "alias": {
        "react": "preact/compat",
        "react-dom": "preact/compat"
    },
    "dependencies": {
        "mobx": "^5.11.0",
        "mobx-react-lite": "^1.4.1",
        "preact": "^10.0.0-rc.0",
        "react": "^16.8.6",
        "react-jss": "^10.0.0-alpha.22"
    },

If I build now with NODE_ENV=development parcel app.html --open --no-cache I have a bundle including react (~70kb). If I remove react package I have a bundle without react (~24kb).

Is this a known/expected behaviour?

damianobarbati commented 5 years ago

Closing this issue for now because I cannot reproduce it consistently.