question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vite: libs in nx repo does not work with vite

See original GitHub issue

Describe the bug when i try to import a library in the nx repo (from /libs dir) it says the file does not exist. I imported it with compilerOptions.paths but i’ve also tried normal import

To Reproduce Steps to reproduce the behavior:

  • create a nx monorepo with create-nx-workspace
  • create a vite react app with this plugin
  • create a react library with the standart @nrwl/react command
  • import it to the vite app

Expected behavior

That the lib does import and will work as expected

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Jordan-Hallcommented, Feb 24, 2022

Can you put together a demo repo. I’ll take a look at it.

0reactions
Jordan-Hallcommented, Mar 6, 2022

No problem. Happy to help send you the config you need for this one if you need it. It fully support nx libs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vite application can't use prisma if it's imported via a library
Current Behavior For projects using the vite bundler and prisma it's not possible to use enums within a vite application if it's imported...
Read more >
Work with Vite and NX - Medium
This practical post will help you combine Vite with the NX monorepo tool. Follow those steps and you'll see it working as expected....
Read more >
@nrwl/vite | Nx
The Nx plugin for Vite and Vitest. Vite.js is a build tool that aims to provide a faster and leaner development experience for...
Read more >
nx-vue3-vite - npm
Start using nx-vue3-vite in your project by running `npm i ... this issue is resolved: https://github.com/samatechtw/nx-vue3-vite/issues/35.
Read more >
Nx 15.3 — Standalone Projects, Vite, Task Graph and more!
For most of our workforce, working on Nx and Nx Cloud was only part of ... you don't have the typical apps and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found