Hi,
I'm purchased Metronic 8 and I'm following the steps in https://preview.keenthemes.com/metronic8/vue/docs/#/vue-laravel-integration. But by following these steps I couldn't get it working. Can you check if it's up to date or make some video on this topic?
Hi,
Thank you for your feedback.
We checked our doc and some code previews are outdated. Follow the steps below to fix your integration.
const mix = require("laravel-mix");
const path = require("path");
mix.ts("resources/ts/app.ts", "public/js")
.vue({version: 3,})
.webpackConfig({
module: {
rules: [
{
test: /\.tsx?$/,
loader: "ts-loader",
exclude: /node_modules/,
options: {
appendTsSuffixTo: [/\.vue$/],
// For production mode change it to false
// It"s long but it checks types and generates definitions
transpileOnly: true
}
},
{
test: /.mjs$/i,
resolve: {
byDependency: { esm: { fullySpecified: false } },
},
},
],
},
resolve: {
alias: {
"@": path.resolve(__dirname, "resources/ts/src/"),
},
},
});
Hi,
Thanks for the quick reply. I'm using laravel 9 and vite. After searching further in the question I found the same post. I've followed it and it's working now, but I still have some questions:
1. When I run npm run dev and php artisan serve it's working, but I can't use this in production. So I have changed the vite.config.js to:
import path from "path"
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"
import laravel from "laravel-vite-plugin";
export default defineConfig({
resolve: {
alias: [
{ find: "~bootstrap", replacement: path.resolve(__dirname,"node_modules/bootstrap")},
{ find: "@", replacement: path.resolve(__dirname,"resources/ts/src/") }
]
},
plugins: [
vue({
template: {
transformAssetUrls: {
base: "plugin/",
includeAbsolute: false,
},
},
}),
laravel({
input: [
"resources/css/app.css",
"resources/ts/app.ts"
],
refresh: true,
}),
],
});
Hi,
import.meta.env.VITE_APP_NAME
should work fine. Please make sure that you have included VITE_APP_NAME variable in your .env file.Thanks, everything works fine, but it isn't there. There is only media folder, favicon.ico and index.html
Btw don't you have any laravel+vue starter template where it's already integrated including the migration files and auths etc.?
i've downloaded demo8 vue again, and there is no splash-screen.css and fonticon.css