![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
tailwindcss-patch
Advanced tools
get tailwindcss context at runtime ! extract all classes into file!
Nodejs version should >=
16.6.0
<yarn|npm|pnpm> add -D tailwindcss-patch
npx tw-patch install
prepare
script (keeps patch persisted after npm install)package.json
{
/* ... */
"scripts": {
"prepare": "tw-patch install"
}
}
npx tw-patch extract
default there will be a json in .tw-patch/tw-class-list.json
in your project.
you can custom this behavior by config tailwindcss-mangle.config.ts
import { TailwindcssPatcher } from 'tailwindcss-patch'
const twPatcher = new TailwindcssPatcher(/* options */)
// do patch
twPatcher.patch()
// get all contexts at runtime
twPatcher.getContexts()
// get all class generated by tailwindcss utilities
twPatcher.getClassSet()
npx tw-patch init
Then there will be a ts file called tailwindcss-mangle.config.ts
exist in your cwd
.
The config as follows:
import { defineConfig } from 'tailwindcss-patch'
export default defineConfig({})
you can custom tw-patch
behavior by patch
option:
import { defineConfig } from 'tailwindcss-patch'
export default defineConfig({
patch: {
output: {
filename: 'xxx.json',
loose: true,
removeUniversalSelector: true
},
tailwindcss: {
config: 'path/to/your-tailwind.config.js',
cwd: 'project/cwd'
}
}
})
At the moment I just extracted all the tool classes to actually get the context of tailwindcss
to analyze. You can add more functionality to this project by giving me issue
or pr
.
Of course, the extracted JSON
isn't just for you to look at. You can analyze it, and I use it as a data file for my tailwindcss-mangle
.
The tailwindcss-mangle
itself is an obfuscation tool to obfuscate the tools generated by tailwindcss
, see the next article for more details on how to use it.
FAQs
patch tailwindcss for exposing context and extract classes
The npm package tailwindcss-patch receives a total of 0 weekly downloads. As such, tailwindcss-patch popularity was classified as not popular.
We found that tailwindcss-patch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.