Skip to content

在electron环境中,无法排除掉path等nodejs模块 #57

@CHparis

Description

@CHparis

在使用@originjs/vite-plugin-commonjs模块的viteCommonjs()方法之后,使用exclude排除掉path、crypto等nodejs模块之后,代码中还是无法使用path等模块的功能,如:
const path = require('path')
path.join()
将会报错:path.join is not a function
如果我不执行viteCommonjs()则能够正常使用

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