From 27b81d87aeb907f6c3d35ea6f55b4fe56c1e79b4 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Wed, 31 Mar 2021 17:13:57 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fixed=20Vite/=20Tailwind=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 8 ++++---- postcss.config.js | 2 +- tailwind.config.js | 20 ++++++++++---------- vite.config.js | 1 + 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index fd7a26f..2af0a5a 100644 --- a/package.json +++ b/package.json @@ -17,17 +17,17 @@ "vue-router": "4.0.5" }, "devDependencies": { - "@tailwindcss/jit": "0.1.17", + "@tailwindcss/jit": "0.1.18", "@tailwindcss/aspect-ratio": "0.2.0", "@tailwindcss/forms": "0.3.2", "@tailwindcss/line-clamp": "0.2.0", "@tailwindcss/typography": "0.4.0", - "@vitejs/plugin-vue": "1.2.0", - "@vue/compiler-sfc": "3.0.9", + "@vitejs/plugin-vue": "1.2.1", + "@vue/compiler-sfc": "3.0.10", "autoprefixer": "10.2.5", "tailwindcss": "2.0.4", "release-it": "14.5.0", - "vite": "2.1.3" + "vite": "2.1.5" }, "release-it": { "git": { diff --git a/postcss.config.js b/postcss.config.js index 33ad091..0a4ec09 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { plugins: { - tailwindcss: {}, + '@tailwindcss/jit': {}, autoprefixer: {}, }, } diff --git a/tailwind.config.js b/tailwind.config.js index 1c1f75b..8924ba6 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,11 +1,11 @@ module.exports = { - purge: [], - darkMode: "media", // or 'media' or 'class' - theme: { - extend: {}, - }, - variants: { - extend: {}, - }, - plugins: [], -} + purge: [ './index.html', './src/**/*.{vue,js,ts,jsx,tsx}' ], + darkMode: 'media', // or 'media' or 'class' + theme: { + extend: {} + }, + variants: { + extend: {} + }, + plugins: [] +}; diff --git a/vite.config.js b/vite.config.js index d3340f4..8a45b2f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -4,6 +4,7 @@ import path from 'path'; export default defineConfig({ plugins: [ vue() ], + base: './', resolve: { alias: { '@': path.resolve(__dirname, '/src')