-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
feat: commonjs@rollup/plugin-commonjs issue@rollup/plugin-commonjs issueinconsistencyInconsistency between dev & buildInconsistency between dev & buildpending triage
Description
Describe the bug
After updating to version 3 we started getting the following error in our bundle script:
account_multisig.js:48 Uncaught TypeError: Class extends value undefined is not a constructor or null
at account_multisig.js:48:41
at requireAccount_multisig (account_multisig.js:453:2)
at common-index.js:34:31
at requireCommonIndex (common-index.js:53:136)
at requireRpc_errors (rpc_errors.js:10:24)
at json-rpc-provider.js:20:22
at requireJsonRpcProvider (json-rpc-provider.js:356:27)
at index.js:9:29
at requireProviders (index.js:12:131)
at requireAccount (account.js:10:21)
This does not occur in v2. It does also not happen while we are in "dev" mode in v3.
It appears to be an issue with how things are being bundled in the newer version- as the new code is unable to create a specific class in a library near-api-js
as it used to, and the output code does look a little strange.
Reproduction
https://github.com/lostpebble/vite-class-undefined-error
System Info
System:
OS: Windows 10 10.0.19044
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 4.29 GB / 15.79 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 104.0.5112.81
Edge: Spartan (44.19041.1266.0), Chromium (104.0.1293.54)
Internet Explorer: 11.0.19041.1566
npmPackages:
vite: ^3.0.8 => 3.0.8
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
val-samonte, mikemaccana, tonhuynhit, Audiopolis, imki123 and 7 moreval-samonte, mikemaccana, imki123 and elliotBraemthescientist13 and imki123
Metadata
Metadata
Assignees
Labels
feat: commonjs@rollup/plugin-commonjs issue@rollup/plugin-commonjs issueinconsistencyInconsistency between dev & buildInconsistency between dev & buildpending triage