-
Notifications
You must be signed in to change notification settings - Fork 133
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
Couldn't use with wux-weapp #33
Comments
I tried to run your code and found that wux-weapp's source code mistakenly mixed ESM and CJS. In the above use case, we need to modify these two files as follows: 1.node_modules/wux-weapp/dist/helpers/computedBehavior.js // ...
- module.exports = Behavior({
+ export default Behavior({
// 2.node_modules/wux-weapp/dist/helpers/relationsBehavior.js // ...
- module.exports = Behavior({
+ export default Behavior({
// But I suggest you make a PR to wux-weapp, a change that makes their code more robust. 😉 |
@alinjiajun 建议直接用 npm 引入;如果复制 dist 目录引入的话,要留意把 webpack 里的配置改为: // ...
{
test: /\.mina$/,
- exclude: /node_modules/,
+ exclude: [/node_modules/, require('path').resolve(__dirname, 'src/wuxui')],
use: [
{
loader: '@tinajs/mina-loader',
options: {
loaders,
},
},
],
},
// ... |
Am I doing it wrong?
Steps to reproduce
Install
Modified
home.mina
Browser errors
https://github.com/wux-weapp/wux-weapp/
The text was updated successfully, but these errors were encountered: