[Vuejs]-Can't preview Vue app developed with Vite in a 3rd party tool iframe (but can using Vue CLI)

0👍

@edytajordan’s answer:

It turned out, that for the Vite version, I actually had to run the App in the preview mode. My final vite.config.js:

export default defineConfig({
  plugins: [vue()],
  base: '/sampleapp/index.html/',
  server: {
    port: 5001,
    https: true,
  },
  preview: {
    port: 5001,
    https: true,
  }
})

and then run npm run build && npm run preview.

Leave a comment