Open
Description
Here's the roadmap for v0.3.0 updates.
Features
- plugin system
- framework system
-
new jsx transform - jsx magic
- inline style
-
analyze
for production
New JSX transform
with new jsx transform, now we can use jsx without importing React
.
We have decided to postpone this feature until later. See #94 for details.
JSX magic
The new compiler will transpile the JSX intelligently, with this you don't need to import specific components, like Head
, Link
, etc. Just use the native JSX elements instead:
export default function App() {
return (
<>
{/* head for ssr */}
<head>
<title>Hello World</title>
</head>
{/* import css */}
<link rel="stylesheet" href="../styles/app.css" />
{/* redirct pages */}
<a href="/about">About</a>
{/* nav link */}
<a
rel="nav"
href="/about"
data-active-className="active"
data-active-style={{ color: 'purple' }}
>About</a>
{/* prefetch pages */}
<a rel="prefetch" href="/about">About</a>
{/* custom scripts */}
<script src="https://cdn.google.com/ga.js"></script>
<script>{`
function gtag() {
dataLayer.push(arguments)
}
window.dataLayer = window.dataLayer || [];
gtag("js", new Date());
gtag("config", "G-1234567890");
`}</script>
</>
)
}
Inline CSS
Add inline CSS by style
tag with SSR support:
const color = '#d63369'
export default function App() {
return (
<>
<h1>Hello World</h1>
<style>{`
h1 {
color: ${color};
}
`}</style>
</>
)
}
New Compiler & Bundler (#28)
- use swc compiler in Rust instead of tsc
- bundle code in production mode by esbuild
- polyfills
-
es5 - es2015 - es2021
-
Plugins
- builtin css-loader with postcss processor
-
sass-loader (improved by @shadowtime2000 (SASS Support for SASS Plugin #41)) -
wasm-loader - markdown-loader
APIs
- support middlewares
-
decodeBody
readBody
(feat: add new method on Request class #35) thanks @shinspiegel
Server
- support custom server
- path rewrites
- https(tls)
- gzip/br encoding
Improvements
- simplify cli output
-
init
command UI (Simple Init UI #47) - ErrorBoundary UI
Optimization
- modulepreload (Preload All Scripts #9) @shadowtime2000
- cache remote deps
-
compilation symlink mode
Deployment platform support
- Vercel
- build
- APIs(functions)