@omnific/react-scripts
v0.5.3
Published
React app scripts based on Rspack
Readme
@omnific/react-scripts
Usage:
npm i -D @omnific/react-scripts @swc/helpersIn package.json:
{
"scripts": {
"dev": "react-scripts dev",
"build": "react-scripts build"
}
}Create react-scripts.config.ts, react-scripts.config.mts, react-scripts.config.mjs, or react-scripts.config.cjs if you need to customize Rspack.
Use .mjs or .cjs if your runtime Node.js version does not support native TypeScript imports.
Optional Style Integrations
@omnific/react-scripts supports plain CSS by default. Tailwind CSS and Sass are optional
integrations and should be installed by the application only when they are used.
Tailwind CSS
Install Tailwind and the PostCSS integration in your app:
pnpm add -D tailwindcss @tailwindcss/postcssWhen tailwindcss is resolvable from the app root, react-scripts enables
@tailwindcss/postcss automatically.
Sass
Install Sass support in your app:
pnpm add -D sass-loader sass-embeddedWhen both sass-loader and sass-embedded are resolvable from the app root,
react-scripts enables .scss and .sass handling automatically.
Client utilities:
import { isDevelopment, isProduction } from '@omnific/react-scripts';
if (isDevelopment()) {
// Development-only logic
}
if (isProduction()) {
// Production-only logic
}