Skip to content

Commit

Permalink
fix:finish half-assed tailwind install (replaces windicss)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusBorg committed Nov 7, 2023
1 parent 82e3d12 commit 6aa25e2
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 5 deletions.
2 changes: 2 additions & 0 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
},
"devDependencies": {
"@vue/compiler-sfc": "^3.3.8",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"vite": "^4.5.0"
}
Expand Down
6 changes: 6 additions & 0 deletions packages/playground/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
4 changes: 4 additions & 0 deletions packages/playground/src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
Expand Down
1 change: 0 additions & 1 deletion packages/playground/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createApp } from 'vue'
import { install as MyLibPLugin } from '@linusborg/lib'
import App from './App.vue'
import 'virtual:windi.css'
import './index.css'

const app = createApp(App)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('tailwindcss').Config} */
export default {
purge: ['./index.html', './src/**/*.vue', './src/**/*.ts'],
content: ['./index.html', './src/**/*.vue', './src/**/*.ts'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
Expand Down
5 changes: 2 additions & 3 deletions packages/playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import WindiCSS from 'vite-plugin-windicss'
process.env.NODE_ENV
export default defineConfig({
plugins: [vue(), WindiCSS()],
plugins: [vue()],
resolve: {
alias: {
// we alias to the lib's source files in dev
Expand All @@ -19,7 +18,7 @@ export default defineConfig({
// we don't minify so we can look at the bundle ouput. Change if you wanna deploy the playground
minify: false,
rollupOptions: {
// Comment in to move vue out of the bundle - easier to look at it that way.
// Comment in to move vue out of the bundle - easier to look at the app's bundle content that way.
// external: ['vue'],
},
},
Expand Down
70 changes: 70 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6aa25e2

Please sign in to comment.