Closed wowoName closed 2 years ago
一样的问题,暂时把选项中的imports: ['vue']
屏蔽,批量修改下页面导入vue的路径,错误消失,等待大佬解决吧
We temporarily close this due to the lack of enough information. Please provide a minimal reproduction to reopen the issue. Thanks.
maybe related to https://github.com/dart-lang/sdk/issues/38967
it's failed at
{
name: 'constructor',
as: 'constructor',
___dart_isolate_tags_: [Object: null prototype] { _ZxYxX_0_: 1 }
}
How's it sneak into the import list?
no idea, but I add some log and print i
with this.
I have find the root cause of this issue.
const unpluginResolver: ComponentResolver = {
type: "component",
resolve(name: string): ComponentResolveResult {
const p = {"a": import("@/xxx/a")}[name];
if (p != null) {
return p;
}
};
when name is constructor
or toString
, it returns func
.
\node_modules\unplugin-auto-import\node_modules\unplugin\dist\webpack\loaders\transform.js??ref--39-0!\node_modules\unplugin-vue-components\node_modules\unplugin\dist\webpack\loaders\transform.js??ref--40-0!\node_modules\unplugin-auto-import\node_modules\unplugin\dist\webpack\loaders\transform.js??ref--39-0\node_modules\unplugin-vue-components\node_modules\unplugin\dist\webpack\loaders\transform.js??ref--40-0!\node_modules\cache-loader\dist\cjs.js??ref--13-0!\node_modules\babel-loader\lib\index.js!\node_modules\cache-loader\dist\cjs.js??ref--1-0!\node_modules\vue-loader-v16\dist\index.js??ref--1-1!*** Cannot read properties of null (reading 'startsWith')