The content of the third-party package of the development environment (npm run dev) and the production environment (npm run build) import is inconsistent?

Hello, everyone.
in the package import rc-scroll-anim , there was no problem with the development in dev environment, but an error was reported when it was run after compilation. After typing log, I found that the content of import in the two modes was not the same. It"s strange that I didn"t find anything wrong with the source code. The code is as follows:

// ScrollAnim
{Element, Event, Link, OverPack, Parallax, Link, scrollScreen}

// ScrollOverPack
function ScrollOverPack () {
  // ...
}

production environment:

// ScrollAnim
{default: {Element, Event, Link, OverPack, Parallax, Link, scrollScreen}}

// ScrollOverPack
undefined

I would like to ask all the teachers, have you encountered the same situation?


it is best to type out the error exception to see that the environment variables under the two modes should be different.
should see package.json.
conjecture for details. This is usually stored in the environment variable process.env.NODE_DEBUG.

Menu