Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 981 Bytes

README.md

File metadata and controls

44 lines (32 loc) · 981 Bytes

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.