Skip to content

Uncaught ReferenceError: require is not defined in ViteJS #240

@Kukunin

Description

@Kukunin

Describe the bug
The package includes require that causes an exception in a browser bundle built by ViteJS. It happens because of these lines:

https://github.com/squirrellyjs/squirrelly/blob/master/src/file-utils.ts#L1-L2

That file should be imported only in nodejs build, not a browser. At least, it should not be included in ESM format

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions