Skip to content

blimmer/show-vite-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite require is not defined Issue Repro

This repository is a reproduction case for vite issue todo.

To reproduce:

  1. Clone this repo.
  2. Install dependencies (npm ci)
  3. Start vite (npm run dev)

You'll see the following error in the console:

Uncaught ReferenceError: require is not defined
    js entry.js:8
    __require chunk-L26DXZYY.js:12
    <anonymous> react-date-picker:1

The require in question is a css import from the react-date-picker library:

require("react-calendar/dist/Calendar.css");

Indeed, this isn't getting rewritten by the vite process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published