You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you try and use the DefaultParser from @yozora/core-parser using the cjs lib you get the following error:
TypeError: invariantisnotafunctionatconsumeNewOpener(https://cigod8.csb.app/node_modules/@yozora/core-parser/lib/cjs/index.cjs:143:13)atObject.consume(https://cigod8.csb.app/node_modules/@yozora/core-parser/lib/cjs/index.cjs:303:13)atmatchBlockTokens(https://cigod8.csb.app/node_modules/@yozora/core-parser/lib/cjs/index.cjs:793:27)atObject.process(https://cigod8.csb.app/node_modules/@yozora/core-parser/lib/cjs/index.cjs:736:32)atCustomParser.parse(https://cigod8.csb.app/node_modules/@yozora/core-parser/lib/cjs/index.cjs:975:32)atObject.eval(https://cigod8.csb.app/src/CustomParser.test.ts:15:25)athttps://codesandbox.io/static/js/3.09a963795.chunk.js:1:338381atnewPromise(<anonymous>)
at t.callAsyncFn (https://codesandbox.io/static/js/3.09a963795.chunk.js:1:338040)
at https://codesandbox.io/static/js/7.916d1bd34.chunk.js:1:6522
at c (https://codesandbox.io/static/js/vendors~app~embed~sandbox~sandbox-startup.7424373eb.chunk.js:1:4328)
Hi @ep-mark , thank you for trying out yozora, the issue you reported is ACK, and I will take the time to fix it. Maybe I will remove all default export of all packages under this monorepo, which would completely avoid this bundle issue (this is a breaking change, but I think it's okay since there are no third-party dependencies).
When you try and use the
DefaultParser
from@yozora/core-parser
using the cjs lib you get the following error:Here is a code sandbox for the problem:
https://codesandbox.io/s/delicate-haze-cigod8?file=/index.html
The
@yozora/invariant/lib/cjs/index.cjs
looks like:which comes from https://github.com/yozorajs/yozora/blob/main/packages/invariant/src/index.ts
The problem occurs when
@yozora/core-parse/lib/cjs/index.cjs
requires the@yozora/invariant'
, expecting the default to be theinvariant
function.But for this to work it would need to use the default:
I am no rollup expert but I think it may be something to do with this issue: rollup/rollup#1961
Thanks
The text was updated successfully, but these errors were encountered: