Closed teethgrinder closed 2 years ago
Do you import your index.css
file inside your main.js
?
sorry paste error, I have added them in main.js file. I have edited my question.
What is content
key in vite.config.js
?
it is in tailwind.config.js but i have wrongly written vite.config.js.. I have changed it. but still same.
You have a main.js
file and you are importing main.ts
in your index.html
. Copy/paste error ?
you are right that error comes from that line, I edited that line. if any one needs, last form is like below.
new tailwind.config.js
:
module.exports = {
//content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}', "./src/**/*.{html,js}"],
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}',],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {
fontFamily: {
'body': ['Karla', 'sans-serif'],
'title': ['Karla', 'sans-serif']
},
colors: {
'pri': '#081F4D'
}
},
},
variants: {
extend: {},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
],
}
postcss.config.js
:
module.exports = {
plugins: {
"postcss-import": {},
tailwindcss: {},
autoprefixer: {},
},
}
and main.js
import { createApp } from 'vue';
import App from './App.vue';
import './index.css';
import './assets/css/custom.css';
import './assets/css/style.css';
import router from './router/index.js';
import * as apolloProvider from './apollo-provider.js'
createApp(App).use(router).use(apolloProvider.provider).mount('#app')
All your errors are gone ? You see your page with CSS ?
Yes it works, thanks for you help and wonderful repo.
No problem, thanks !
Hello thanks for this wonderful repo. I am strugling to import my styles into my django-vite application with vue frontend using tailwind css; my two files are under 'assets/css' directory and named custom.css and style.css: my main.js:
vite.config.js
tailwind.config.js
postcss.config.js
index.css:
my index.html in django is
I can view page but my custom stylesheets are not loaded ? how can I fix it ? Thanks