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

appboard下面使用import引入其他js文件的时候报错,ReferenceError: Can't find variable: require #147

Open
akai-b opened this issue Sep 22, 2022 · 1 comment

Comments

@akai-b
Copy link

akai-b commented Sep 22, 2022

appboard下面使用import引入其他js文件的时候报错,ReferenceError: Can't find variable: require。
使用require也会报相同的错,在vue文件和其他文件下使用import没问题
image

是因为在appboard下面不支持模块化?

@FeverNode
Copy link

是的,appboard不会被webpack打包,而是直接被引用,require是早期nodejs为了支持模块化自带的函数。

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