Skip to content

Commit

Permalink
Changed web to React 19
Browse files Browse the repository at this point in the history
  • Loading branch information
fgatti675 committed Jan 28, 2025
1 parent edbcf9d commit e75810c
Show file tree
Hide file tree
Showing 6 changed files with 303 additions and 164 deletions.
1 change: 1 addition & 0 deletions website/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//TODO: remove this file
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
120 changes: 94 additions & 26 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { themes as prismThemes } from "prism-react-renderer";

const fontaine = require("fontaine");
const path = require("path");
// const fontaine = require("fontaine");
import path from "path";

import { config } from "dotenv";

import { defineReactCompilerLoaderOption, reactCompilerLoader } from "react-compiler-webpack";

config();

require("dotenv").config();

const generateAPI = process.env.REACT_GENERATE_API === "true";

Expand All @@ -23,9 +28,43 @@ module.exports = {
docSearchAppId: process.env.REACT_APP_DOC_SEARCH_APP_ID
},
future: {
// experimental_faster: true,
// experimental_faster: false,
experimental_faster: {
swcJsLoader: true,
swcJsMinimizer: true,
swcHtmlMinimizer: true,
lightningCssMinimizer: true,
rspackBundler: true,
mdxCrossCompilerCache: true,
},
},
webpack: {
// rules: [
// {
// test: /\.js$/,
// use: [
// {
// loader: "builtin:swc-loader",
// options: {
// // SWC options for JS
// },
// },
// ],
// },
// {
// test: /\.jsx$/,
// use: [
// {
// loader: "builtin:swc-loader",
// options: {
// // SWC options for JSX
// },
// },
// { loader: "babel-loader" },
// ],
// },
// ],
},
webpack: {},
plugins: [
"docusaurus-tailwindcss-loader",
"docusaurus-plugin-sass",
Expand Down Expand Up @@ -83,30 +122,59 @@ module.exports = {
}
};
},
function fontainePlugin(_context, _options) {
// function fontainePlugin(_context, _options) {
// return {
// name: "fontaine-plugin",
// configureWebpack(_config, _isServer) {
// return {
// plugins: [
// fontaine.FontaineTransform.webpack({
// fallbacks: [
// "system-ui",
// "-apple-system",
// "BlinkMacSystemFont",
// "Segoe UI",
// "Roboto",
// "Oxygen",
// "Ubuntu",
// "Cantarell",
// "Open Sans",
// "Helvetica Neue",
// "sans-serif"
// ],
// // You may need to resolve assets like `/fonts/Poppins-Bold.ttf` to a particular directory
// resolvePath: (id) => "../fonts/" + id
// })
// ]
// };
// }
// };
// },
function reactCompiler(_context, _options) {
return {
name: "fontaine-plugin",
name: "react-compiler-plugin",
configureWebpack(_config, _isServer) {
return {
plugins: [
fontaine.FontaineTransform.webpack({
fallbacks: [
"system-ui",
"-apple-system",
"BlinkMacSystemFont",
"Segoe UI",
"Roboto",
"Oxygen",
"Ubuntu",
"Cantarell",
"Open Sans",
"Helvetica Neue",
"sans-serif"
],
// You may need to resolve assets like `/fonts/Poppins-Bold.ttf` to a particular directory
resolvePath: (id) => "../fonts/" + id
})
]
module: {
rules: [
{
test: /\.[mc]?[jt]sx?$/i,
exclude: /node_modules/,
use: [
// babel-loader, swc-loader, esbuild-loader, or anything you like to transpile JSX should go here.
// If you are using rspack, the rspack's buiilt-in react transformation is sufficient.
// { loader: 'swc-loader' },
// Now add forgetti-loader
{
loader: reactCompilerLoader,
options: defineReactCompilerLoaderOption({
// React Compiler options goes here
})
}
]
}
]
}
};
}
};
Expand Down
9 changes: 7 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"node": ">=18"
},
"dependencies": {
"@babel/core": "^7.26.7",
"@babel/plugin-syntax-jsx": "^7.25.9",
"@docsearch/js": "3.7.0",
"@docusaurus/core": "3.7.0",
"@docusaurus/faster": "^3.7.0",
Expand All @@ -38,13 +40,16 @@
"@mdx-js/react": "^3.1.0",
"aos": "^2.3.4",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.2.1",
"babel-plugin-react-compiler": "^19.0.0-beta-27714ef-20250124",
"clsx": "^2.1.1",
"dotenv": "^16.4.5",
"postprocessing": "^6.36.0",
"prism-react-renderer": "^2.3.1",
"raw-loader": "^4.0.2",
"react": "file:../node_modules/react",
"react-dom": "file:../node_modules/react-dom",
"react": "19.0.0",
"react-compiler-webpack": "^0.1.2",
"react-dom": "19.0.0",
"react-fast-marquee": "^1.6.5",
"react-responsive-masonry": "^2.3.0",
"react-syntax-highlighter": "^15.5.0",
Expand Down
8 changes: 6 additions & 2 deletions website/src/pages/pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ function FeaturesPage() {
<Hero
title={
<>
<span className="block lg:inline">Pricing</span>
<div className="max-w-4xl mx-auto">
<h2 className={"uppercase font-mono"}>
Full no-code/low-code solution
</h2>
</div>
</>}
// subtitle={
// <>
Expand Down Expand Up @@ -92,7 +96,7 @@ function FeaturesPage() {
<FireCMSCloudVersions/>

<CLIInstructions/>
<PricingQuote/>
<PricingQuote/>
<VersionsComparison/>


Expand Down
8 changes: 2 additions & 6 deletions website/src/partials/pricing/FireCMSCloudVersions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,9 @@ export function FireCMSCloudVersions() {
className={clsx(defaultBorderMixin, "flex flex-col text-gray-900 items-center justify-center text-lg border-0 border-t bg-gray-50")}>

<div className={clsx(ContainerMixin, ContainerPaddingMixin, "flex flex-col gap-8")}>

w
<div className={"max-w-4xl mx-auto"}>
<h2 className={"mb-3 uppercase font-mono"}>
Full no-code/low-code solution
</h2>

<p className={"max-w-6xl mx-auto"}>
<p className={"max-w-6xl mx-auto mt-0 mb-8"}>
<strong>FireCMS Cloud</strong> offers a complete, end-to-end
solution for businesses that require the highest level of
support and security. With dedicated hosting, advanced features, and
Expand Down
Loading

0 comments on commit e75810c

Please sign in to comment.