Skip to content

Citolab/tspci-vite

Repository files navigation

tspci vite

A vite only pci builder

Getting Started

This is a modified default Vite preact project.

Added this to the vite.config.ts

vite.config.ts

  build: {
    copyPublicDir: false,
    lib: {
      name:"pci",
      entry: resolve(__dirname, 'src/index.tsx'),
      formats: ['umd']
    },
    rollupOptions: {
      external:"qtiCustomInteractionContext",
      output: {
        entryFileNames: "index.js",
        dir: "public"
      }
    },
  },

You have to run both

  • npm run dev or npm start - for the develop environment
  • npm run build - for the modified rollup UMD build

copied the test template index.html into this project to test the build

the PCI is continously build with rollup and placed in the public folder. index.js

No need to kick a final build, just copy this version.

About

A vite only pci creator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published