lost-pixel: Lost Pixel failes to load config with Vite React template

Bug description

Hi I’ve tried to use Lost Pixel with custom React setup (webpack, babel, typescript, storybook) and it works perfectly well. But when I tried to use it with Vite React Template, npm run lost-pixel gave me this error: ✅ Found config file: C:\work\user\lost-pixel\lostpixel.config.ts ❌ Loading config using ESBuild failed, using fallback option ❌ Failed to load config file: C:\work\user\lost-pixel\lostpixel.config.js

It is not clear from docs what configuration do I need to use Lost Pixel locally without CI features.

How to reproduce

Expected behavior

Lost Pixel information

No response

lost-pixel logs from CI

Loading project config … Current working directory: C:\work\user\lost-pixel Looking for config file: C:\work\user\lost-pixel\lostpixel.config.(ts|js|cjs|mjs) ✅ Found config file: C:\work\user\lost-pixel\lostpixel.config.ts ❌ Loading config using ESBuild failed, using fallback option ❌ Failed to load config file: C:\work\ulbi\lost-pixel\lostpixel.config.ts

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19

Most upvoted comments

Thanks for your support! Everything works great. I’ve setup CI as well. I don’t need usage of lost-pixel.com for now. Looking forward for new features 😄

trying to throw a quick reproduction for now. Thanks for the inputs & pointers 🙏🏼

Yeah, can confirm it is behaving in a really weird way:

https://github.com/lost-pixel/lp-next-reproduction/actions/runs/5853821591/job/15868582862

then we probably have some issues with Vite in general and will need to investigate. Any help & contribution is very much appreciated!

we are using bundle-require and most probably, it has issues either in Vite context or on Windows, not sure what exactly causes this:

https://github.com/lost-pixel/lost-pixel/blob/577ef49b36983a4252f7825fa7e4e3792b2838d2/src/configHelper.ts#L6-L20