-
Notifications
You must be signed in to change notification settings - Fork 20
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
使用 vant 1.6.7 的 van-picker 报错 #172
Comments
可以重现。目前定位到是在这种场景下用 relative-file-loader 解析路径会有误 https://github.com/ambar/relative-file-loader/blob/7f1222d/src/index.js#L45-L51 context: |
可以试试这样绕过,对 node_modules 内的依赖不使用 relative 规则 {
test: /\.wxml$/,
+ exclude: /node_modules/,
use: [
{
loader: 'relative-file-loader',
options: {
name: 'wxml/[name].[hash:6].[ext]',
},
},
{
loader: '@tinajs/wxml-loader',
options: {
raw: true,
enforceRelativePath: true,
root: resolve('src'),
},
},
],
},
+ {
+ test: /\.wxml$/,
+ include: /node_modules/,
+ use: [
+ {
+ loader: 'relative-file-loader',
+ options: {
+ name: 'wxml/[name].[hash:6].[ext]',
+ relative: false
+ },
+ },
+ {
+ loader: '@tinajs/wxml-loader',
+ options: {
+ raw: true,
+ enforceRelativePath: true,
+ root: resolve('src'),
+ },
+ },
+ ],
+ }, |
有用 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
package.json
警告信息
原因:template 相对路径处理错误
路径中的
src
不应该存在,应该这个路径才对The text was updated successfully, but these errors were encountered: