chore: configure vite, react, and stimulus bootstrap
This commit is contained in:
2
assets/app.js
Normal file
2
assets/app.js
Normal file
@@ -0,0 +1,2 @@
|
||||
import './bootstrap.js';
|
||||
import './styles/app.css';
|
||||
6
assets/bootstrap.js
vendored
Normal file
6
assets/bootstrap.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { startStimulusApp } from '@symfony/stimulus-bundle';
|
||||
import { registerReactControllerComponents } from '@symfony/ux-react';
|
||||
|
||||
const app = startStimulusApp();
|
||||
|
||||
registerReactControllerComponents(require.context('./react/controllers', true, /\.(j|t)sx?$/));
|
||||
@@ -9,6 +9,12 @@
|
||||
"enabled": false,
|
||||
"fetch": "eager"
|
||||
}
|
||||
},
|
||||
"@symfony/ux-react": {
|
||||
"react": {
|
||||
"enabled": true,
|
||||
"fetch": "eager"
|
||||
}
|
||||
}
|
||||
},
|
||||
"entrypoints": []
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import { startStimulusApp } from '@symfony/stimulus-bundle';
|
||||
|
||||
const app = startStimulusApp();
|
||||
// register any custom, 3rd party controllers here
|
||||
// app.register('some_controller_name', SomeImportedController);
|
||||
0
assets/styles/app.css
Normal file
0
assets/styles/app.css
Normal file
21
package.json
Normal file
21
package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "ltbxd-actorle",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@floating-ui/react": "^0.27",
|
||||
"@hotwired/stimulus": "^3.2",
|
||||
"@hotwired/turbo": "^7.3",
|
||||
"@symfony/stimulus-bundle": "file:vendor/symfony/stimulus-bundle/assets",
|
||||
"@symfony/ux-react": "file:vendor/symfony/ux-react/assets",
|
||||
"react": "^19.0",
|
||||
"react-dom": "^19.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-react": "^4.3",
|
||||
"vite": "^6.0"
|
||||
}
|
||||
}
|
||||
23
vite.config.js
Normal file
23
vite.config.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import symfonyPlugin from 'vite-plugin-symfony';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
symfonyPlugin(),
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
input: {
|
||||
app: './assets/app.js',
|
||||
},
|
||||
},
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 5173,
|
||||
strictPort: true,
|
||||
origin: 'http://localhost:5173',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user