0.54.2 • Published 2 years ago

@startupjs/vite-plugin-startupjs v0.54.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@startupjs/vite-plugin-startupjs

Compile web client in development using vite

Installation

  1. Install vite and this plugin

    yarn add vite @startupjs/vite-plugin-startupjs
  2. Add vite.config.mjs to the root of your project:

    import { defineConfig } from 'vite'
    import startupjsPlugin from '@startupjs/vite-plugin-startupjs'
    
    // https://vitejs.dev/config/
    export default defineConfig({
      plugins: [
        startupjsPlugin()
      ]
    })

Usage

Run server and web compilation together:

yarn start -v

If you want to run server and web compilation separately:

  1. Run server with -v option:

    yarn server -v
  2. Run web with -v option:

    yarn web -v

IMPORTANT things to follow when writing code:

  1. You CAN NOT use .js/.ts for files which have JSX (or use Pug). You MUST name them .jsx/.tsx.

  2. To leverage Vite's power of compiling only the pages you currently look at, you have to be using async imports on the router level.

    Make sure that pages/index.jsx (it might also be pages/index.js) in all of your apps have the following comment specified at the top of the file:

    /* @asyncImports */

    This will automatically transform all imports in this file into react lazy async imports.

0.55.0-alpha.1

2 years ago

0.55.0-alpha.0

2 years ago

0.53.3

2 years ago

0.53.0

2 years ago

0.55.0-alpha.11

2 years ago

0.54.1

2 years ago

0.54.2

2 years ago

0.54.0

2 years ago

0.52.3

2 years ago

0.52.0-alpha.0

2 years ago

0.50.23

2 years ago

0.52.1

2 years ago

0.51.0

2 years ago

0.52.0

2 years ago

0.50.13

2 years ago

0.50.12

2 years ago

0.50.5

2 years ago

0.48.0

3 years ago

0.49.0

3 years ago

0.47.6

3 years ago

0.47.4

3 years ago

0.47.0

3 years ago

0.44.28

3 years ago

0.45.5

3 years ago

0.45.6

3 years ago

0.45.3

3 years ago

0.45.4

3 years ago

0.46.0

3 years ago

0.45.1

3 years ago

0.45.2

3 years ago

0.45.0

3 years ago

0.44.23

3 years ago

0.44.24

3 years ago

0.44.16

3 years ago

0.44.17

3 years ago

0.44.14

3 years ago

0.44.0

3 years ago

0.42.0

3 years ago

0.43.0

3 years ago

0.41.2

3 years ago

0.41.0

3 years ago

0.42.20

3 years ago

0.42.6

3 years ago

0.43.1

3 years ago

0.41.4

3 years ago

0.40.9

3 years ago

0.40.6

4 years ago

0.39.11

4 years ago

0.40.2

4 years ago

0.40.0

4 years ago

0.40.1

4 years ago

0.39.10

4 years ago

0.39.9

4 years ago

0.39.8

4 years ago