Skip to content

Commit

Permalink
Add vite
Browse files Browse the repository at this point in the history
  • Loading branch information
curder committed Oct 19, 2023
1 parent 5c74f55 commit ce54bd6
Show file tree
Hide file tree
Showing 3 changed files with 219 additions and 190 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function sidebarProgrammingLanguage()
items: [
{text: "重定向 redirect", link: "/programming-language/php/laravel/route/redirect"},
{text: "@each 渲染集合视图", link: "/programming-language/php/laravel/blade/each"},
{text: "Vite 静态资源替换", link: "/programming-language/php/laravel/blade/vite"},
{text: "pint 代码风格", link: "/programming-language/php/laravel/code-style/pint"},
]
}
Expand Down
9 changes: 9 additions & 0 deletions docs/programming-language/php/laravel/blade/vite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Vite 静态资源替换

```php
# 替换规则
src="../../assets/([^"]*)"

# 替换为
src="{{ Vite::asset('resources/$1') }}"
```
Loading

0 comments on commit ce54bd6

Please sign in to comment.