我如何在Laravel 9和Vite中将资产从资源目录发布到公共目录
我不知道,如何在Laravel 9和Vite中将资产从资源目录发布到公共目录。
我尝试这个,但它不起作用。
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel([
'resources/css/app.css',
'resources/js/app.js',
'resources/css/global/plugins.css',
'resources/css/style.css',
{
from: 'resources/assets',
to: 'public/assets',
}
]),
],
});
I don't know, how can I publish the assets from resources directory to the public directory in Laravel 9 and Vite.
I try this but it's not working.
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel([
'resources/css/app.css',
'resources/js/app.js',
'resources/css/global/plugins.css',
'resources/css/style.css',
{
from: 'resources/assets',
to: 'public/assets',
}
]),
],
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试此操作
,然后
将使用您的编译资产来运行一个文件夹
Try this
then run
a folder with your compiled assets will be created