UPGRADE LARAVEL 9.45 AND VITE
parent
fc8ef03d8e
commit
7ccafd4bc2
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
{
|
||||
"/app.js": "/app.js?id=d3ff915bff3de87b87cc",
|
||||
"/app-dark.css": "/app-dark.css?id=3ae28ef5f7b987d68dc6",
|
||||
"/app.css": "/app.css?id=7c970f699ed9cf60d80b"
|
||||
"/app.js": "/app.js?id=08317cb3c83c7035246fe3d474db3454",
|
||||
"/app-dark.css": "/app-dark.css?id=3ae28ef5f7b987d68dc611118c646308",
|
||||
"/app.css": "/app.css?id=7c970f699ed9cf60d80b273b4ad2ad61"
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
require('./bootstrap');
|
||||
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { createInertiaApp } from '@inertiajs/inertia-react';
|
||||
import { InertiaProgress } from '@inertiajs/progress';
|
||||
import 'react-toastify/dist/ReactToastify.css';
|
||||
|
||||
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
|
||||
|
||||
createInertiaApp({
|
||||
title: (title) => `${title} - ${appName}`,
|
||||
resolve: (name) => require(`./Pages/${name}`),
|
||||
setup({ el, App, props }) {
|
||||
return render(<App {...props} />, el);
|
||||
},
|
||||
});
|
||||
|
||||
InertiaProgress.init({ color: '#570df8' });
|
@ -0,0 +1,22 @@
|
||||
import "./bootstrap"
|
||||
import "../css/app.css"
|
||||
|
||||
import React from "react";
|
||||
import { render } from "react-dom";
|
||||
import { createInertiaApp } from "@inertiajs/inertia-react";
|
||||
import { InertiaProgress } from "@inertiajs/progress";
|
||||
import { resolvePageComponent } from "laravel-vite-plugin/inertia-helpers";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
|
||||
const appName =
|
||||
window.document.getElementsByTagName("title")[0]?.innerText || "Laravel";
|
||||
|
||||
createInertiaApp({
|
||||
title: (title) => `${title} - ${appName}`,
|
||||
resolve: (name) => resolvePageComponent(`./Pages/${name}.jsx`, import.meta.glob('./Pages/**/*.jsx')),
|
||||
setup({ el, App, props }) {
|
||||
return render(<App {...props} />, el);
|
||||
},
|
||||
});
|
||||
|
||||
InertiaProgress.init({ color: "#570df8" });
|
@ -0,0 +1,15 @@
|
||||
import { defineConfig } from "vite";
|
||||
import laravel from "laravel-vite-plugin";
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
laravel(["resources/css/app.css", "resources/js/app.jsx"]),
|
||||
react(),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": "/resources/js",
|
||||
},
|
||||
},
|
||||
});
|
@ -1,27 +0,0 @@
|
||||
const mix = require('laravel-mix');
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mix Asset Management
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Mix provides a clean, fluent API for defining some Webpack build steps
|
||||
| for your Laravel applications. By default, we are compiling the CSS
|
||||
| file for the application as well as bundling up all the JS files.
|
||||
|
|
||||
*/
|
||||
|
||||
mix
|
||||
.js('resources/js/app.js', 'public/js')
|
||||
.react()
|
||||
.postCss('resources/css/app.css', 'public/css', [
|
||||
require('postcss-import'),
|
||||
require('tailwindcss'),
|
||||
require('autoprefixer'),
|
||||
])
|
||||
.webpackConfig(require('./webpack.config'))
|
||||
.disableSuccessNotifications();
|
||||
|
||||
if (mix.inProduction()) {
|
||||
mix.version();
|
||||
}
|
Loading…
Reference in New Issue