Skip to content

typeof typeof noUiSlider causes require is not defined bug #476

Closed
@NikarashiHatsu

Description

@NikarashiHatsu

Summary

Double typeof keyword causes require is not defined bug

Steps to Reproduce

  1. Install Preline on a fresh Laravel project using this guide.
  2. Build the asset using npm run build or bun run build.
  3. See the error such as screenshot below:
Screenshot 2024-10-07 at 15 40 54 Screenshot 2024-10-07 at 15 41 02

My current workaround is downgrading to 2.4.0 or editing the package file to remove the extra typeof.

Please let me know if this is intended, or a typo, since I'm not an expert into JavaScript.

Demo Link

https://github.com/NikarashiHatsu/preline-typeof-bug

Expected Behavior

There are no require is not defined error on the console.

Actual Behavior

The error require is not defined is exists on compiled asset of Preline.

Screenshots

Screenshot 2024-10-07 at 15 40 54 Screenshot 2024-10-07 at 15 41 02

On line 50
Screenshot 2024-10-07 at 15 53 04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions