Comments (8)
Probably related to the latest version of Vite, which is a bit of a moving target:
(!) "build.base" config option is deprecated. "base" is now a root-level config option.
(!) "base" config option should start and end with "/".
I will release another version tomorrow targeting beta.44
, moving build.base
to base
.
For now, try using vite: "2.0.0-beta.34"
.
from vite_ruby.
Seems like it might be working better... but I have to rewrite a lot of stuff to find out :-)
Thanks for the quick response, will let you know what I find out when I can dig into it a bit more.
from vite_ruby.
Thanks again for the prompt response! I wasn't aware of that import syntax--but it doesn't seem to work either. I'm also a bit concerned that it's not going to work for the vite build
version of the app as well, since there isn't actually an export on default. I am using vite-plugin-vue2
, since vite allegedly won't work without it, but this all seems like a bit too much going on to investigate at this point. Perhaps when vuetify goes to Vue 3 I can use Vue 3, then maybe this will all work out. Thank you for your time!
from vite_ruby.
Hey, thanks for reporting.
That null
there suggests that there might be a missing configuration option.
Would you share your config/vite.json
? Also, please run bin/rake vite:info
and paste the result so that I can verify that you are not using a previous version.
The example app is also running 6.1.1, so it might be related to config.
from vite_ruby.
@arcreative Just released an update of vite_rails
(1.0.11
) and vite-plugin-ruby
(1.0.5
).
Please try using it with the latest vite
(2.0.0-beta46
), and let me know how it goes.
from vite_ruby.
@ElMassimo Any idea why I would be getting Vue.use is not a function
when doing a standard import Vue from 'vue'
and then trying to initiate a module? The import looks like the following (an object with default property that corresponds to what Vue
should be):
from vite_ruby.
Hard to know without more context, but from what I see in the screenshot, it seems the object is an ES module (instead of the export).
Try doing the following:
import { default as Vue } from 'vue'
or
Vue.default.use(...)
If it works, then it means the module is not unwrapping as expected. Not sure what could cause that to happen (could be related to any Vite plugins you are using, in which case upgrading to their latest versions might be worth a try).
I have a working example with Vue here, but it's not using the default export from Vue.
If you switched to Vue 3, it might be that the API for use
has changed.
If using Vue 2, it might be necessary to use a specific Vite plugin.
from vite_ruby.
Have an example running Vite with Vue 2, you can find the details in this pull request.
from vite_ruby.
Related Issues (20)
- Some assets are randomly missing after deployment with Capistrano HOT 1
- yarn 3 Missing Executable
- How do I turn off the Inter-roman and Inter-italic fonts?
- Configurable option for location of vite.config.ts HOT 2
- Update rack-proxy to at least 0.7.5 HOT 2
- resolve_entries is slow when using vite_javascript_tag for very large and complex tsx react/relay files HOT 2
- `An import map is added after module script load was triggered` in console. HOT 4
- Fail to load styles from js files when it conflicts with stylesheet tag
- Support new default manifest location in Vite v5 HOT 9
- plugin_legacy is not working as expected
- Allow `.` as a valid option for `sourceCodeDir`
- 'conflicting chdir during another chdir block' calling vite_asset_path
- Can't find SVG file in manifest after upgrade to 3.5.0 HOT 2
- "The CJS build of Vite's Node API is deprecated." HOT 4
- Disabling cssCodeSplit breaks CSS file location used by tag helper in Rails HOT 1
- vite-rails live demo on Heroku is broken HOT 1
- clean command not detecting versions properly HOT 1
- Calling `bin/vite ssr` just exits with no errors
- vite_hanami in hanami 2.1
- vite.config.ts base: './' not applied
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_ruby.