forked from JS-DevTools/version-bump-prompt
-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
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
run versionBumpp function in a mjs file #9
Comments
honghuangdc
changed the title
TS type ReleaseType in build chunk
run versionBumpp function in a mjs file
Jun 4, 2023
same error |
用 // src > release-type.ts
import type { ReleaseType } from "semver"; 但是打包后直接运行
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Here are the steps to reproduce the error:
import { ReleaseType } from "semver";
^^^^^^^^^^^
SyntaxError: Named export 'ReleaseType' not found. The requested module 'semver' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'semver';
const { ReleaseType } = pkg;
I found a TS type declaration ReleaseType in dist/chunk-L3LY4KGC.mjs.
Reproduction
https://stackblitz.com/edit/stackblitz-starters-7ky89b?file=index.mjs
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: