Open bojmaliev opened 1 year ago
I'm using this package in my Laravel 10, Vue 3, Inertia 1 project but I'm getting 'defineLayout' is not defined
'defineLayout' is not defined
This is my vite.config.js file:
vite.config.js
import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; import vue from '@vitejs/plugin-vue'; import eslintPlugin from 'vite-plugin-eslint'; import inertiaLayout from "momentum-layout" export default defineConfig({ plugins: [ laravel({ input: 'resources/js/app.js', refresh: true, }), vue({ template: { transformAssetUrls: { base: null, includeAbsolute: false, }, }, }), inertiaLayout(), eslintPlugin(), ], });
and this is the way I'm using the package:
<template> <div></div> </template> <script setup> import DefaultLayout from "@/Layouts/DefaultLayout.vue"; defineLayout(DefaultLayout) </script> <style scoped></style>
It's more eslint issue, I deleted eslint. I don't really know how to "tell" it to understand the Vite macro.
I'm using this package in my Laravel 10, Vue 3, Inertia 1 project but I'm getting
'defineLayout' is not defined
This is my
vite.config.js
file:and this is the way I'm using the package: