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

Are there multiple js files in the directory packaged by NCC? #1169

Open
killghost opened this issue Feb 28, 2024 · 2 comments
Open

Are there multiple js files in the directory packaged by NCC? #1169

killghost opened this issue Feb 28, 2024 · 2 comments
Labels
question Further information is requested

Comments

@killghost
Copy link

Are there multiple js files in the directory packaged by NCC?

const pinyins = await nccwpck_require.e(/* import() */ 346).then(nccwpck_require.t.bind(nccwpck_require, 4346, 23));

index.js
346.index.js

Can anyone tell me why this is?

@styfle styfle added the question Further information is requested label Feb 28, 2024
@styfle
Copy link
Member

styfle commented Feb 28, 2024

Could be an asset read like fs.readFile('./foo.js')

Also could be from --asset-builds flag.

@killghost
Copy link
Author

import pinyin from "pinyin";

console.log(pinyin("中心")); // [ [ 'zhōng' ], [ 'xīn' ] ]

console.log(pinyin("中心", {
heteronym: true, // 启用多音字模式
})); // [ [ 'zhōng', 'zhòng' ], [ 'xīn' ] ]
consol

iuse this lib in typescript script project

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

No branches or pull requests

2 participants