Open Patrick-Remy opened 2 years ago
@Patrick-Remy Can you verify if 0.2.x fix this?
I can test it in two weeks 👍
Yes it works great as expected, thanks for your fast fix.
I am sorry, there is still missing base path for vite and nuxt client.js in index.html
<script type="module" src="/@vite/client"></script>
<script type="module" src="/_nuxt/client.js"></script>
But it's perfect now for other places, like user-defined resources.
Not sure if something like this would fix it: https://github.com/Patrick-Remy/vite/commit/f7a832c3857c9cd4f9cd715e21f048957d51ef9e As I can't test it, when I install the package from my github or local path, it fails with weird require errors.
Versions
nuxt-vite: v0.1.1 nuxt: v2.15.7
Reproduction
Tbd
Description
If using
vite.base
option, the build will get broken. But it isn't required as files are properly generated and moved to subdir already by nuxt. Only therouter.base
option should be reflected in theDEFAULT_APP_TEMPLATE
andAPP_TEMPLATE
.Update: Unfortunately the build must also be fixed, as if
vite.base
isn't set any imports in the resulting scripts are using absolute paths.Previous issue description
I am not sure, if layouts are currently supported by this plugin. The example doesn't have any and in my case I receive the message:
ERROR /src/layouts/error.vue has no corresponding SFC entry in the cache. This is a vite-plugin-vue2 internal error, please open an issue.
This is also the case if I delete this 'layout', the error still exists with path
/.nuxt/components/nuxt-error.vue
. So I am not sure, if this is worknuxt/vite
needs to do (e.g. inject components in layouts dir?) or it