-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project): implement and test rendering using epic-jsx
Migrate to zero-configuration and publish source directly as TypeScript and JSX. BREAKING CHANGE: Published as TypeScript and JSX, new create API and for Preact connect plugin required.
- Loading branch information
Showing
13 changed files
with
486 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { defineConfig } from '@rsbuild/core' | ||
import { pluginReact } from '@rsbuild/plugin-react' | ||
|
||
export const rsbuild = defineConfig({ | ||
plugins: [pluginReact()], | ||
source: { | ||
entry: { | ||
index: './index.tsx', | ||
}, | ||
define: { | ||
'process.env.PUBLIC_URL': '"/"', | ||
}, | ||
}, | ||
html: { | ||
title: 'epic-router Demo', | ||
favicon: '../logo.png', | ||
}, | ||
output: { | ||
assetPrefix: '/', | ||
}, | ||
tools: { | ||
rspack: { | ||
resolve: { | ||
alias: { | ||
react: 'preact/compat', | ||
'react-dom/test-utils': 'preact/test-utils', | ||
'react-dom': 'preact/compat', | ||
'react/jsx-runtime': 'preact/jsx-runtime', | ||
'react/jsx-dev-runtime': 'preact/jsx-dev-runtime', | ||
}, | ||
}, | ||
}, | ||
}, | ||
}) | ||
|
||
export const gitignore = 'recommended' | ||
|
||
export const typescript = { | ||
extends: 'web', | ||
files: ['index.tsx'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
{ | ||
"papua": { | ||
"title": "epic-router Demo", | ||
"icon": "../logo.png", | ||
"publicPath": "/" | ||
"name": "demo", | ||
"scripts": { | ||
"start": "rsbuild dev --open", | ||
"types": "tsc" | ||
}, | ||
"dependencies": { | ||
"epic-router": "^4.1.0", | ||
"@rsbuild/core": "^0.6.8", | ||
"@rsbuild/plugin-react": "^0.6.8", | ||
"epic-state": "^0.6.0", | ||
"exmpl": "^3.1.0", | ||
"papua": "^5.9.7", | ||
"preact": "^10.19.5" | ||
"preact": "^10.19.5", | ||
"typescript": "^5.4.5", | ||
"zero-configuration": "^0.13.0" | ||
}, | ||
"localDependencies": { | ||
"epic-router": ".." | ||
} | ||
}, | ||
"trustedDependencies": [ | ||
"zero-configuration" | ||
], | ||
"type": "module" | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.