diff --git a/.gitignore b/.gitignore index e1f2218e..9e7771f5 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ Homestead.json Homestead.yaml Thumbs.db !/_env/* +./vite.config.js diff --git a/_env/vite.config.js b/_env/vite.config.js new file mode 100755 index 00000000..270d1516 --- /dev/null +++ b/_env/vite.config.js @@ -0,0 +1,44 @@ +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; +import tailwindcss from '@tailwindcss/vite'; + +export default defineConfig({ + plugins: [ + laravel({ + input: [ + 'resources/css/app.css', + 'resources/js/app.js', + 'resource/cfn/css/app.css', + 'resource/cvf/css/app.css', + 'resource/vcf/css/app.css', + ], + refresh: true, + }), + tailwindcss(), + ], + server: { + https: false, // 关掉! + host: '127.0.0.1', + port: 5173, + strictPort: true, + hmr: { + protocol: 'ws', // 走普通的 ws,别 wss 了 + host: '127.0.0.1', + }, + }, + resolve: { + alias: { + '@fonts': '/resources/fonts', + }, + }, +// build: { +// rollupOptions: { +// external: ['jquery'], +// output: { +// globals: { +// jquery: '$', +// }, +// }, +// }, +// },tru +});