This repository was archived by the owner on Aug 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +69
-17
lines changed
Expand file tree Collapse file tree 4 files changed +69
-17
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import ReactDOM from 'react-dom/client' ;
3+ import App from './App.tsx' ;
4+ import '../css/index.css' ;
5+
6+ const root = document . getElementById ( 'root' ) ;
7+ const path = root ?. dataset . path || '' ;
8+
9+ ReactDOM . createRoot ( root ! ) . render (
10+ < React . StrictMode >
11+ < App path = { path } />
12+ </ React . StrictMode >
13+ ) ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import ReactDOM from 'react-dom/client' ;
3+ import App from './App.tsx' ;
4+ import '../css/index.css' ;
5+
6+ const root = document . getElementById ( 'root' ) ;
7+ const path = root ?. dataset . path || '' ;
8+
9+ ReactDOM . createRoot ( root ! ) . render (
10+ < App path = { path } />
11+ ) ;
Original file line number Diff line number Diff line change 1- <?php include base_path (' /vendor/luminarix/laravel-web-tinker/dist/index.html' ); ? >
1+ <!doctype html>
2+ <html lang =" en" >
3+ <head >
4+ <meta charset =" UTF-8" />
5+ <meta name =" viewport" content =" width=device-width, initial-scale=1.0" />
6+ <link rel =" icon" href =" {{ asset (' vendor/web-tinker/img/favicon.png' ) } }" />
7+ <title >Tinker</title >
8+ </head >
9+ <body >
10+ <div id =" root" data-path =" /tinker" ></div >
11+ @if (app ()-> environment (' production' ) )
12+ <script src =" {{ asset (' vendor/web-tinker/production.js' ) } }" ></script >
13+ @else
14+ <script src =" {{ asset (' vendor/web-tinker/development.js' ) } }" ></script >
15+ @endif
16+ </body >
17+ </html >
Original file line number Diff line number Diff line change @@ -4,21 +4,33 @@ import react from "@vitejs/plugin-react";
44import { viteStaticCopy } from "vite-plugin-static-copy" ;
55
66export default defineConfig ( {
7- plugins : [
8- react ( ) ,
9- viteStaticCopy ( {
10- targets : [
11- {
12- src : "resources/img" ,
13- dest : "" ,
14- } ,
15- ] ,
16- } ) ,
17- ] ,
18- base : "/vendor/web-tinker/" ,
19- resolve : {
20- alias : {
21- "@" : path . resolve ( __dirname , "./resources/js" ) ,
7+ plugins : [
8+ react ( ) ,
9+ viteStaticCopy ( {
10+ targets : [
11+ {
12+ src : "resources/img" ,
13+ dest : "" ,
2214 } ,
15+ ] ,
16+ } ) ,
17+ ] ,
18+ base : "/vendor/web-tinker/" ,
19+ resolve : {
20+ alias : {
21+ "@" : path . resolve ( __dirname , "./resources/js" ) ,
2322 } ,
24- } ) ;
23+ } ,
24+ build : {
25+ outDir : "dist" ,
26+ rollupOptions : {
27+ input : {
28+ production : path . resolve ( __dirname , "resources/js/main.production.tsx" ) ,
29+ development : path . resolve ( __dirname , "resources/js/main.development.tsx" ) ,
30+ } ,
31+ output : {
32+ entryFileNames : "[name].js" ,
33+ } ,
34+ } ,
35+ } ,
36+ } ) ;
You can’t perform that action at this time.
0 commit comments