ViteJS configuration in VuePress with Quasar leading to "Component is missing template or render function." #535
-
|
I receive following error while using ViteJS with VuePress v2 and Quasar Framework v2. ViteJS config is defined in the Commenting out the ViteJS configuration fixes the issue. But I cannot use the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
I have also tried following configurations
vue in plugins section with vuePluginOptions in-built feature. But the dev build shows the following error In your Vite config file, please add the Quasar plugin after the Vue one. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Using Could you help to test if this can work properly: Move export const createPlugin = ({
app,
options,
isServer,
isBuild,
}: {
app: App
options: ViteBundlerOptions
isServer: boolean
isBuild: boolean
}): Plugin[] => [
- // official vue plugin
- createVuePlugin(options.vuePluginOptions),
// vuepress custom plugin
createConstantsReplacementPlugin(app),
createMainPlugin({
app,
options,
isServer,
isBuild,
}),
createWorkaroundPlugin(),
]export const createDev = (
options: ViteBundlerOptions
): Bundler['dev'] => async (app: App) => {
const viteConfig = mergeConfig(
{
configFile: false,
plugins: [
+ // official vue plugin
+ createVuePlugin(options.vuePluginOptions),
createPlugin({
app,
options,
isServer: false,
isBuild: false,
}),
],
// `clearScreen` won't take effect in `config` hook of plugin API
clearScreen: false,
},
options.viteOptions ?? {}
) |
Beta Was this translation helpful? Give feedback.
Using
vuePluginOptionsshould work 🤔 . If it did not work, there might be something related to how vite resolves nested plugins.Could you help to test if this can work properly:
Move
createVuePlugin()fromcreatePlugintocreateDev, and put it beforecreatePlugin():export const createPlugin = ({ app, options, isServer, isBuild, }: { app: App options: ViteBundlerOptions isServer: boolean isBuild: boolean }): Plugin[] => [ - // official vue plugin - createVuePlugin(options.vuePluginOptions), // vuepress custom plugin createConstantsReplacementPlugin(app), createMainPlugin({ app, options, isServer, isBuild, }), createWorkaroundPlugin(), ]