-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this compatible with Vue SSR and Typescript? #143
Comments
Yes. Make sure you're bundling vuetify for the server too, |
Hi @KaelWD , To be honest, I'm not sure to understand correctly the 2 cases described below. Note that I'm using the https://github.com/Akryum/vue-cli-plugin-ssr plugin to have SSR working. Attempt 1According to: Just by using this:
It should work. But it does not after building in production and trying to start the web server (serving a page results in the error described initially). The only difference with your example is the Attempt 2I decided to add also the
In this case building+serving pages works but it implies a weird warning/error during the build process:
I don't understand how severe this message is 🤔 . Any thoughts about it? Thank you, PS: sorry for not being that much confident with the webpack pipeline of Vuetify :( EDIT: to "remove" the "Attempt 2" warning/error message, I found 2 propositions on internet: It's indeed silenting the warning message, but when serving the pages it fails because the plugin is not here anymore 😞 (that's logic). EDIT2: to remove this warning... the maintainer answered andris9/encoding#18 (comment) but I still don't get why putting the |
I don't think you need |
That's what I thought this property was specific to your settings... It makes absolutely no sense, see below the weird cases depending on the webpack config I use and the following script commands:
Attempt 1 [FAILED]
Attempt 2 [FAILED]
Attempt 3 [FAILED]
Attempt 4 [SUCCESS]
It also works with the Note that those paths do not exist! So the only working solution for me is by targetting a non-existing directory. I'm about to loose my hair haha... I don't get anything from this situation 😿 EDIT: maybe it means that's the original externals from the SSR plugin that make everything bugging 🤔 |
I made it working in all cases... just switched the code to Here is the code:
You definitely showed me the right way with externals, thank you so much for helping 👍 |
If that works can't you just use |
Oh... yes it also work, didn't try a new time since yesterday without the |
Hi @KaelWD ,
To use the "a-la-carte" feature from Vuetify I tried both things:
vue add vuetify
with correct settingsyarn install
as described in the documentationI can
yarn serve
but as soon as I go on my page in the browser I get this fatal error:I tried to remove VIcon references, but I got the same for VApp so I think that's a global error.
Context: I'm using Vue SSR but also Typescript. Does someone used both in the past with the
vuetify-loader
?Note that I can
build
without trouble, the error is just when doingserve
.Thank you,
EDIT: note that after some research I tried upgrading from Node v12 to Node v13 and v14 but didn't change anything even when specifying
"type": "module",
in thepackage.json
EDIT2: since that's a
SyntaxError
it seems not related to Typescript so probably only due to Vue SSR 😢The text was updated successfully, but these errors were encountered: