npm

@coodev/core
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-dev.15 • Public • Published

Coodev Core

Usage

Install

npm i @coodev/react react react-dom

Create pages

Create page component in pages directory, for example pages/index.tsx

import React from 'react'

export default function Home() {
  return <div>Home</div>
}

Development

Add dev script in package.json

{
  "scripts": {
    "dev": "coodev-react"
  }
}

Start development server

npm run dev

Build

Add build script in package.json

{
  "scripts": {
    "build": "coodev-react build"
  }
}

Build

npm run build

Coodev Configuration

/**
 * config
 */
const coodevConfig = {
  root: '.',
  ssr: {
    streamingHtml: true,
  },
  runtimeConfig: {},
  plugins: [
    {
      configResolved?(config: InternalConfiguration): Promisable<void>
      configureCoodev?(coodev: Coodev): void | (() => void)
      buildEnd?(options: BuildEndOptions, output: BuildOutput): Promisable<void>
      documentHtml?(html: string): Promisable<void | string>
      htmlRendered?(html: string): Promisable<void | string>
    }
  ],
}

Readme

Keywords

none

Package Sidebar

Install

npm i @coodev/core

Weekly Downloads

6

Version

1.0.0-dev.15

License

MIT

Unpacked Size

36.8 kB

Total Files

18

Last publish

Collaborators

  • panghu1996