Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RSC-based static site generator #10057

Merged
merged 8 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename to react-static
  • Loading branch information
devongovett committed Dec 23, 2024
commit 5b65d906079017b27e6a1577007362e08b940e2c
1 change: 1 addition & 0 deletions packages/configs/default/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
},
"namers": ["@parcel/namer-default"],
"runtimes": [
"@parcel/runtime-rsc",
"@parcel/runtime-js",
"@parcel/runtime-browser-hmr",
"@parcel/runtime-service-worker"
Expand Down
1 change: 1 addition & 0 deletions packages/configs/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@parcel/resolver-default": "2.13.3",
"@parcel/runtime-browser-hmr": "2.13.3",
"@parcel/runtime-js": "2.13.3",
"@parcel/runtime-rsc": "2.13.3",
"@parcel/runtime-service-worker": "2.13.3",
"@parcel/transformer-babel": "2.13.3",
"@parcel/transformer-css": "2.13.3",
Expand Down
8 changes: 0 additions & 8 deletions packages/configs/react-ssg/index.json

This file was deleted.

7 changes: 7 additions & 0 deletions packages/configs/react-static/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "@parcel/config-default",
"namers": ["@parcel/namer-static", "..."],
"packagers": {
"*.html": "@parcel/packager-react-static"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@parcel/config-react-ssg",
"name": "@parcel/config-react-static",
"version": "2.13.3",
"license": "MIT",
"repository": {
Expand All @@ -9,8 +9,7 @@
"main": "index.json",
"dependencies": {
"@parcel/config-default": "2.13.3",
"@parcel/namer-ssg": "2.13.3",
"@parcel/packager-react-ssg": "2.13.3",
"@parcel/runtime-rsc": "2.13.3"
"@parcel/namer-static": "2.13.3",
"@parcel/packager-react-static": "2.13.3"
}
}
8 changes: 0 additions & 8 deletions packages/core/integration-tests/test/react-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ describe('react server components', function () {
}),
);

await overlayFS.writeFile(
path.join(dir, '.parcelrc'),
JSON.stringify({
extends: '@parcel/config-default',
runtimes: ['@parcel/runtime-rsc', '...'],
}),
);

await overlayFS.writeFile(path.join(dir, 'yarn.lock'), '');
});

Expand Down
8 changes: 4 additions & 4 deletions packages/core/integration-tests/test/react-ssg.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ describe('react static', function () {
let count = 0;
let dir;
beforeEach(async () => {
dir = path.join(__dirname, 'react-ssg', '' + ++count);
dir = path.join(__dirname, 'react-static', '' + ++count);
await overlayFS.mkdirp(dir);
await overlayFS.writeFile(
path.join(dir, 'package.json'),
JSON.stringify({
name: 'react-ssg-test',
name: 'react-static-test',
dependencies: {
react: '^19',
},
Expand All @@ -28,15 +28,15 @@ describe('react static', function () {
await overlayFS.writeFile(
path.join(dir, '.parcelrc'),
JSON.stringify({
extends: '@parcel/config-react-ssg',
extends: '@parcel/config-react-static',
}),
);

await overlayFS.writeFile(path.join(dir, 'yarn.lock'), '');
});

after(async () => {
await overlayFS.rimraf(path.join(__dirname, 'react-ssg'));
await overlayFS.rimraf(path.join(__dirname, 'react-static'));
});

it('should render to HTML', async function () {
Expand Down
4 changes: 0 additions & 4 deletions packages/examples/react-server-components/.parcelrc

This file was deleted.

2 changes: 1 addition & 1 deletion packages/examples/react-static/.parcelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@parcel/config-react-ssg"
"extends": "@parcel/config-react-static"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@parcel/namer-ssg",
"name": "@parcel/namer-static",
"version": "2.13.3",
"license": "MIT",
"publishConfig": {
Expand All @@ -13,8 +13,8 @@
"type": "git",
"url": "https://github.com/parcel-bundler/parcel.git"
},
"main": "lib/SSGNamer.js",
"source": "src/SSGNamer.js",
"main": "lib/StaticNamer.js",
"source": "src/StaticNamer.js",
"engines": {
"node": ">= 16.0.0",
"parcel": "^2.13.3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@parcel/packager-react-ssg",
"name": "@parcel/packager-react-static",
"version": "2.13.3",
"license": "MIT",
"publishConfig": {
Expand All @@ -13,8 +13,8 @@
"type": "git",
"url": "https://github.com/parcel-bundler/parcel.git"
},
"main": "lib/ReactSSGPackager.js",
"source": "src/ReactSSGPackager.js",
"main": "lib/ReactStaticPackager.js",
"source": "src/ReactStaticPackager.js",
"engines": {
"node": ">= 16.0.0",
"parcel": "^2.13.3"
Expand Down
Loading