Allow class like Tailwind work #282
Closed
IRediTOTO
started this conversation in
Ideas & Features
Replies: 1 comment 2 replies
-
Hi @IRediTOTO 1. Installation in Next Install Stylify
Install concurrently
Create stylify config const { Bundler } = require('@stylify/bundler');
const isDev = process.argv[process.argv.length - 1] === '--w';
const bundler = new Bundler({
watchFiles: isDev,
// Optional
// Compiler config info https://stylifycss.com/en/docs/stylify/compiler#configuration
compiler: {
// https://stylifycss.com/en/docs/stylify/compiler#variables
variables: {},
// https://stylifycss.com/en/docs/stylify/compiler#macros
macros: {},
// https://stylifycss.com/en/docs/stylify/compiler#components
components: {},
// ...
}
});
// This bundles all CSS into one file
// You can configure the Bundler to bundle CSS for each page separately
// See bundler link below
bundler.bundle([
{files: ['./path/to/**/*.tsx'], outputFile: './path/to/styles/stylify.css' },
]); Then import generated stylify in your next.js
Last step is to update package.json: "scripts": {
"build": "npm run stylify:build & next build",
"dev": "concurrently 'npm run stylify:dev' 'next dev",
"stylify:build": "node stylify.js",
"stylify:dev": "node stylify.js --w"
} 2. Tailwind Classes Let me know if you have any trouble with the NextJS configuration. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I just found your package on GG
I would like that you allow the use of the Tailwind class name. I have person project write with Tailwind, but If change to your package I don't want refactor all of these Tw.
Let's make an example of NextJS, I don't quite understand how to install this package
Beta Was this translation helpful? Give feedback.
All reactions