Skip to content

ReferenceError: require is not defined in production mode (dev mode works fine!) #22

@penobit

Description

@penobit

Hi there.
i have an issue with your package, it works perfectly fine on development mode, but in the build there is an error:
ReferenceError: require is not defined
image
image

im using:
package manager: yarn
build tool: Vite

System:
OS: Windows 11 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz
Memory: 2.35 GB / 7.82 GB
Binaries:
Node: 18.18.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.2.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.2283.0), Chromium (120.0.2210.91)
Internet Explorer: 11.0.22621.1
npmPackages:
vite: ^4.0.0 => 4.5.0

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