We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In #51387 the codebase changed to use ESBuild. And now require('typescript') will include __esModule: true and that is a breaking change.
require('typescript')
__esModule: true
> require("typescript").version '4.9.2-rc' > require("typescript").__esModule undefined >
> require('typescript').version '5.0.0-dev.20221109' > require('typescript').__esModule true >
This crashes https://github.com/hipstersmoothie/react-docgen-typescript-plugin
TypeError: Cannot read properties of undefined (reading 'JsxEmit') at DocgenPlugin.getOptions (node_modules/@storybook/react-docgen-typescript-plugin/dist/plugin.js:246:39)
It's output code uses tslib.importDefault to import typescript.
tslib.importDefault
const typescript_1 = tslib_1.__importDefault(require("typescript")); let compilerOptions = { jsx: typescript_1.default.JsxEmit.React, // ~~~~~~~~~~~~~~~~~~~~ ts namespace before, undefined after module: typescript_1.default.ModuleKind.CommonJS, target: typescript_1.default.ScriptTarget.Latest, };
The text was updated successfully, but these errors were encountered:
Thanks for testing this so early. This is unfortunate.
Can you try with "typescript": "npm:@typescript-deploys/[email protected]" and see if the issue goes away? (from #51474)
"typescript": "npm:@typescript-deploys/[email protected]"
Sorry, something went wrong.
yes, this fixes the problem
Successfully merging a pull request may close this issue.
In #51387 the codebase changed to use ESBuild. And now
require('typescript')
will include__esModule: true
and that is a breaking change.This crashes https://github.com/hipstersmoothie/react-docgen-typescript-plugin
It's output code uses
tslib.importDefault
to import typescript.The text was updated successfully, but these errors were encountered: