Closed IDrinkMoreWater closed 7 years ago
I had this issue, I made it work by adding ~ to the path for the alias, because otherwise it seems like webpack is looking for a node module, thus giving the error.
Example:
webpack config:
resolve: {
alias:{'~MOBILE':path.resolve(__dirname, '../node_modules/antd-mobile')},
...
},
Register Import:
import Button from '~MOBILE/lib/button';
@adjnor thank you very much. worked!
webpack config:
Register Import:
Console error log: