Skip to content
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

import問題 #76

Closed
Cpk0521 opened this issue Sep 11, 2022 · 2 comments
Closed

import問題 #76

Cpk0521 opened this issue Sep 11, 2022 · 2 comments

Comments

@Cpk0521
Copy link

Cpk0521 commented Sep 11, 2022

package.json
pack

問題
unknown

根據document的做法

// if only Cubism 4
import { Live2DModel } from 'pixi-live2d-display/cubism4';

卻無法import模組

@guansss
Copy link
Owner

guansss commented Sep 11, 2022

TS 对这种 import 方式的支持还不是很好,可以把 tsconfig 里的 moduleResolution 设为 nodenext,然后重启一下 TS 服务或者直接重启 vscode

{
  "compilerOptions": {
    "moduleResolution": "nodenext"
  }
}

@Cpk0521
Copy link
Author

Cpk0521 commented Sep 11, 2022

好的 我稍後會嘗試

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants