Skip to content

Taro webpack5 cache enable时的编译问题 #62

@tyuan511

Description

@tyuan511

taro3.5.2配置cache: {enable:true},当有缓存存在时,编译会出问题
复现:config/index.js中添加compiler: 'webpack5', cache: {enable:true}配置,运行两次yarn dev:weapp或者yarn build:weapp即可复现
初步来看当cache存在时module?._source?_valueAsString会变成undefined,导致跳过了后续的转换。通过module.originalSource()?.source()好像可以获取到内容

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions