Install tailwindcss and its peer dependencies via npm.
npm install -D tailwindcss postcss autoprefixer
Install @g-loot/css-framework via npm.
npm install @g-loot/css-framework
Import the Framework CSS into your project stylesheet.
@import "@g-loot/css-framework/styles/globals.css";
Add postcss-loader to webpack.config.js.
module: {
rules: [
{
test: /\.(css)$/,
use: ['style-loader', 'css-loader', 'postcss-loader'],
}
]
}
Import the framework config into your project tailwind.config.js and indicate which files Tailwind should scan.
const tailwindConfig = require('@g-loot/css-framework/tailwind.config');
module.exports = {
...tailwindConfig,
content: [
"./pages/*.{js,ts,jsx,tsx,json}",
],
};