mammadataei / cypress-vite

Run Cypress specs using Vite
MIT License
85 stars 10 forks source link

Invalid value for option "output.inlineDynamicImports" #98

Open tobiasBora opened 2 months ago

tobiasBora commented 2 months ago

Thanks for this tool. I use the recommended file:

import { defineConfig } from "cypress";
import vitePreprocessor from 'cypress-vite'
import path from 'path'

export default defineConfig({
  component: {
    devServer: {
      framework: "svelte",
      bundler: "vite",
    },
  },

  e2e: {
    setupNodeEvents(on) {
      on(
        'file:preprocessor',
        vitePreprocessor({
          configFile: path.resolve(path.resolve(), './vite.config.ts'),
          mode: 'development'
        }),
      )
    },
  },
});

unfortunately, I get an error:

Invalid value for option "output.inlineDynamicImports" - multiple inputs are not supported when "output.inlineDynamicImports" is true.

I don't know if it matters but I'm using svelte 5.

Note that I also tried to disable it with:

import { defineConfig } from "cypress";
import vitePreprocessor from 'cypress-vite'
import path from 'path'

export default defineConfig({
  component: {
    devServer: {
      framework: "svelte",
      bundler: "vite",
    },
  },

  e2e: {
    setupNodeEvents(on) {
      on(
        'file:preprocessor',
        vitePreprocessor({
          configFile: path.resolve(path.resolve(), './vite.config.ts'),
          mode: 'development',
          rollup: {
            output: {
              inlineDynamicImports: false
            }
          }
        }),
      )
    },
  },
});

without sucess.