Skip to content

v0.3.0 #5

Open
Open
@ije

Description

@ije

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

Screen-Shot-2020-11-24-at-23 02 22

Plugins

APIs

Server

  • support custom server
  • path rewrites
  • https(tls)
  • gzip/br encoding

Improvements

Optimization

Deployment platform support

  • Vercel
    • build
    • APIs(functions)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions