Comments (6)
It appears the resolver is matching twice for Vuex
import { useStore } from "vuex";
The browser attempts to load bundler as:
http://10.0.75.1:3000/@modules/%5C@modules%5Cvuex%5Cdist%5Cvuex.esm-bundler.js
Where as the following import works:
import { useStore } from "vuex/dist/vuex.esm-bundler";
from vite.
@ais-one Evan is doing a pretty good job. Would you please change the "adn" typo in the title. Shows respect to provide our issues polished, clean and concise. :)
from vite.
For me, this works (with vue-router 4.0.0-alpha.9; Mac):
import { createRouter, createWebHistory } from 'vue-router/dist/vue-router.esm.js';
There was earlier a mention in the README
that Vite might have a path mapper, at some point in the future. It also mentioned import maps as one long term solution.
Would you be fine with that approach?
from vite.
typo fixed... I can try out your suggestion... I think a fix is already on the way. I am on windows...
from vite.
For me, this works (with vue-router 4.0.0-alpha.9; Mac):
import { createRouter, createWebHistory } from 'vue-router/dist/vue-router.esm.js';
this works
There was earlier a mention in the
README
that Vite might have a path mapper, at some point in the future. It also mentioned import maps as one long term solution.Would you be fine with that approach?
let me read up more on this
from vite.
Tested with latest vite and it's working with vuex@next
and vue-router@next
. Please open new issue if still having problems.
from vite.
Related Issues (20)
- Running `vite --debug build` runs in "serve" mode HOT 3
- updating to vite 5 breaking react-router-dom HOT 4
- New files added after dev start are not served if public is outside the root. HOT 2
- new URL ,The packing volume increases 打包体积增大 HOT 4
- Dev(or serve) mode doesn't compatible with amd format. HOT 2
- Vite Dev Mode not loading css in react SSR application HOT 7
- const antdLocale: any = await import(../../node_modules/ant-design-vue/es/locale/${locale}.js);语句在Windows生产环境中挂住 HOT 2
- Within a dev container using Docker 26, `vite dev` or `vite preview` cannot be accessed from the host HOT 7
- Support module loading priority
- Manifest.json Documentation is Confusing
- 环境变量值后面使用注释,请求接口会报错
- I always get : An import map is added after module script load was triggered HOT 1
- Line limit from esbuild breaks vite production build HOT 1
- Vite versions after v5.0.13 are not including asset urls in build HOT 1
- Broken sourcemapping for vite after 5.0.13 HOT 4
- Vite prevents native autocomplete to be disabled HOT 1
- Support Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy on hmr dev server HOT 4
- Compile executables with Vite build --compile HOT 2
- Vite Package Manager HOT 1
- Error context from rollup / esbuild errors is swallowed and only the stack trace is printed HOT 1
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.