我正在使用 Laravel、Vite、Tailwind CSS,上周所有这些都有效。今天,重新启动使其陷入困境。
Npm run build
不会很好地构建东西,该网站有点崩溃。大多数 CSS 功能都可以工作,但其他一些功能则不能(例如 paddings-margins)。
我是新手,如何调查?
我的vite.config.js:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: true,
}),
],
});
有时,如果您定义了顺风类,例如
`px-${variable_number}`
未找到类并被清除,请参阅 https://tailwindcss.com/docs/content-configuration#class-detection-in-deep