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

小程序wxs文件中require不支持 #48

Open
ldwonday opened this issue Jan 2, 2019 · 4 comments
Open

小程序wxs文件中require不支持 #48

ldwonday opened this issue Jan 2, 2019 · 4 comments

Comments

@ldwonday
Copy link

ldwonday commented Jan 2, 2019

如题,wxs文件中的require并没有被打包。导致小程序编译出错。
image
image

希望尽快支持下,谢谢了!

另外是不是不支持npm引入第三方组件?

@jessjava
Copy link

wxs设置一下webpack打包时可以复制过去的

{ test: /\.(json|png|jpg|gif|wxs)$/, include: /src/, use: relativeFileLoader() },

@ldwonday
Copy link
Author

@jessjava 你这个方法不行,试过了,除非拷贝!

@jessjava
Copy link

webpack这里设置就是 copy过去呀。我的工程可以哦

@ldwonday
Copy link
Author

@jessjava 我是在package.json中增加

"copyWebpack": [
    "assets",
    "components/vant-weapp/dist/wxs"
  ],

其他的地方没动

{ test: /\.(json|png|jpg|gif|wxs)$/, include: /src/, use: relativeFileLoader() }

这个不行

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