[Vuejs]-Vue-tabs-component custom classes

0👍

install tailwind to project:

npm install tailwindcss --save-dev

create a tailwind.js file in your project’s root:

./node_modules/.bin/tailwind init tailwind.js

create a main.css containing:

@tailwind preflight;
@tailwind components;
@tailwind utilities;

Modify scripts in package.json to build main.css:

"scripts": {
  "tailwind:build": "./node_modules/.bin/tailwind build ./input_path/main.css -c ./tailwind.js -o ./outputh_path/styles.css",
  "serve": "npm run tailwind:build && vue-cli-service serve",
  "build": "npm run tailwind:build && vue-cli-service build",
  "lint": "vue-cli-service lint"
}

Place link in your public/index.html:

<link rel="stylesheet" href="<%= webpackConfig.output.publicPath %>output_path/styles.css" />

Leave a comment