0.54.2 • Published 6 months ago

@startupjs/vite-plugin-startupjs v0.54.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months 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

7 months ago

0.55.0-alpha.0

7 months ago

0.53.3

7 months ago

0.53.0

9 months ago

0.55.0-alpha.11

6 months ago

0.54.1

7 months ago

0.54.2

7 months ago

0.54.0

7 months ago

0.52.3

11 months ago

0.52.0-alpha.0

12 months ago

0.50.23

1 year ago

0.52.1

12 months ago

0.51.0

12 months ago

0.52.0

12 months ago

0.50.13

1 year ago

0.50.12

1 year ago

0.50.5

1 year ago

0.48.0

2 years ago

0.49.0

1 year ago

0.47.6

2 years ago

0.47.4

2 years ago

0.47.0

2 years ago

0.44.28

2 years ago

0.45.5

2 years ago

0.45.6

2 years ago

0.45.3

2 years ago

0.45.4

2 years ago

0.46.0

2 years ago

0.45.1

2 years ago

0.45.2

2 years ago

0.45.0

2 years ago

0.44.23

2 years ago

0.44.24

2 years ago

0.44.16

2 years ago

0.44.17

2 years ago

0.44.14

2 years ago

0.44.0

2 years ago

0.42.0

2 years ago

0.43.0

2 years ago

0.41.2

2 years ago

0.41.0

2 years ago

0.42.20

2 years ago

0.42.6

2 years ago

0.43.1

2 years ago

0.41.4

2 years ago

0.40.9

2 years ago

0.40.6

2 years ago

0.39.11

3 years ago

0.40.2

3 years ago

0.40.0

3 years ago

0.40.1

3 years ago

0.39.10

3 years ago

0.39.9

3 years ago

0.39.8

3 years ago