Comments (8)
v1.3.0
support 👉 node_modules
from vite-plugin-dynamic-import.
I'm facing the same problem when expecting vite-plugin-dynamic-import will work on some imported node_modules libs.
For instance, to reproduce :
create a basic vite project
install @ionic/core : npm install @ionic/core
Import it in your index.ts file :
Hey 👋 @fcamblor it works to me. @v1.3.0
dynamicImport({
filter(id) {
// `node_modules` is exclude by default, so we need to include it explicitly
if (id.includes('node_modules/@ionic')) {
return true
}
},
}),
from vite-plugin-dynamic-import.
@caoxiemeihao, I've seen your README update from yesterday but didn't got a chance to try it out before you did.
Thanks a lot for a that fast workaround ;-)
from vite-plugin-dynamic-import.
I too am having issues trying to dynamically import from node_modules folder
from vite-plugin-dynamic-import.
Who can provide a minimal reproduction repo?
from vite-plugin-dynamic-import.
https://github.com/Miofly/vue-admin-plus
plugin is in vite-common-config
from vite-plugin-dynamic-import.
I'm facing the same problem when expecting vite-plugin-dynamic-import
will work on some imported node_modules
libs.
For instance, to reproduce :
- create a basic vite project
- install
@ionic/core
:npm install @ionic/core
- Import it in your
index.ts
file :
import { defineCustomElements as defineIonicCustomElements } from '@ionic/core/loader';
....
defineIonicCustomElements();
- Include a simple
<ion-button>hello</ion-button>
in your app - You will see an error in the console :
... and this file is not handled properly by vite (I assume this is because it is outside of my project's scope, because located in node_modules
)
from vite-plugin-dynamic-import.
i use latest version,Although the function is not affected, the following error will occur when starting
is seem to import type error
repo link:https://github.com/Miofly/vue-admin-plus
from vite-plugin-dynamic-import.
Related Issues (20)
- Bare imports do not work in monorepos HOT 8
- Cannot find module 'vite-plugin-utils' or its corresponding type declarations. HOT 2
- Build error when using the plugin in Vite.config HOT 1
- How can I import from some package?
- Internal server error: Cannot use 'import.meta' outside a module HOT 3
- when i use node_modules error will occur when starting HOT 3
- Source Maps and Line Numbers are not correct HOT 1
- Please add a LICENSE if you are okay with people using this plugin HOT 1
- Not working in Vue project HOT 1
- `// [vite-plugin-dynamic-import] runtime -S-` header missing in compiled source HOT 3
- Massive import size HOT 2
- [vite-plugin-dynamic-import] Generated runtime code has redundant judgment rules in some cases HOT 1
- The above dynamic import cannot be analyzed by Vite. HOT 5
- Dynamic import not working Windows HOT 1
- Failed to parse vite-plugin-federation HOT 1
- Imports don't work within defineAsyncComponent() in Vue 2/3 HOT 2
- [Feature Request] Import map support HOT 5
- dynamic import not include subfolder HOT 1
- re Disable dynamic import detection for one line or for whole project HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vite-plugin-dynamic-import.