-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Tailwind to v2.0 #85
Comments
Would |
After package.json{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"dependencies": {
"@tailwindcss/aspect-ratio": "^0.2.0",
"@tailwindcss/forms": "^0.2.1",
"@tailwindcss/typography": "^0.3.1",
"alpinejs": "^2.8.0",
"autoprefixer": "^10.2.1",
"axios": "^0.21",
"laravel-mix": "^6.0.0-beta.14",
"lodash": "^4.17.19",
"postcss": "^8.2.3",
"tailwindcss": "^2.0.2"
},
"name": "appname"
} webpack.mix.jsconst mix = require("laravel-mix");
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js("resources/js/app.js", "public/js")
.postCss("resources/css/app.css", "public/css", [
require("tailwindcss"),
])
.sourceMaps();
if (mix.inProduction()) {
mix.version();
} tailwind.config.jsconst defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
theme: {
extend: {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
},
},
variants: {},
purge: {
content: [
'./app/**/*.php',
'./resources/**/*.html',
'./resources/**/*.js',
'./resources/**/*.jsx',
'./resources/**/*.ts',
'./resources/**/*.tsx',
'./resources/**/*.php',
'./resources/**/*.vue',
'./resources/**/*.twig',
],
options: {
defaultExtractor: (content) => content.match(/[\w-/.:]+(?<!:)/g) || [],
whitelistPatterns: [/-active$/, /-enter$/, /-leave-to$/, /show$/],
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
require('@tailwindcss/aspect-ratio'),
],
}; base.blade.php<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@hasSection('title')
<title>@yield('title') - {{ config('app.name') }}</title>
@else
<title>{{ config('app.name') }}</title>
@endif
<!-- Favicon -->
<link rel="shortcut icon" href="{{ url(asset('favicon.ico')) }}">
<!-- Fonts -->
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<!-- Styles -->
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
@livewireStyles
<!-- Scripts -->
<script src="{{ url(mix('js/app.js')) }}" defer></script>
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
</head>
<body>
@yield('body')
@livewireScripts
</body>
</html> Everything I kept the same. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any plans to upgrade Tailwind to v2.0 (deprecating @tailwindcss/ui) for new laravel-frontend-presets/tall projects?
The text was updated successfully, but these errors were encountered: