-
Notifications
You must be signed in to change notification settings - Fork 78
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
Error: File not found: commonjsHelpers.js #36
Comments
Would you provide a test project to reproduce this issue? |
`import { encrypt, decrypt } from 'crypto-js/aes'; // type WordArray = lib.WordArray; // 加密参数 interface Format { interface CipherOption { // export interface CipherOptions { // JSON.stringify() // aes加密器 public constructor(opt: Partial = {}) { public get getOptions(): CipherOption { // 加密 // 解密 export function encryptByBase64(cipherText: string) { export function decodeByBase64(cipherText: string) { export function encryptByMd5(password: string) { index.ts: |
@qmhc I think this problem is because crypto-js is a umd package. |
|
@luozhihua 没有继续深挖这个问题,目前用 tsup 和 tsc 进行 type 的打包。由于 type 实际只存在于运行态,目前我计划后续研究下 esbuild 在这方面的问题。依赖 rollup 进行对 ts 的类型打包有一些问题,尤其因为我还用了 pnpm,尤其麻烦。只好先作罢了。 |
at DirectoryCoordinator.addSourceFileAtPath (./node_modules/ts-morph/dist/ts-morph.js:18117:19)
at Project.addSourceFileAtPath (./node_modules/ts-morph/dist/ts-morph.js:19567:51)
at Object.transform (./node_modules/vite-plugin-dts/dist/index.js:138846:17)
at ./node_modules/rollup/dist/shared/rollup.js:22620:25
The text was updated successfully, but these errors were encountered: