ember-a11y-testing icon indicating copy to clipboard operation
ember-a11y-testing copied to clipboard

Incompatible with vite minimal mode / needs to be converted to a v2 addon

Open NullVoxPopuli opened this issue 1 year ago • 7 comments

My vite config:

import { ember, extensions } from "@embroider/vite";

import { babel } from "@rollup/plugin-babel";
import info from "unplugin-info/vite";
import { defineConfig } from "vite";

export default defineConfig({
  resolve: {
    extensions,
  },
  plugins: [
    ember(),
    babel({
      babelHelpers: "inline",
      extensions,
    }),
    info(),
  ],
});

The error:

[vite]: Rollup failed to resolve import "ember-a11y-testing/test-support" from "<repo>/tests/application/pages-test.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to

NullVoxPopuli avatar Apr 26 '25 20:04 NullVoxPopuli

@NullVoxPopuli for a practical stand point if we were to do this, should we use:

  • https://github.com/embroider-build/addon-blueprint - which we not supposed to anymore bot would we more suitable for this type of addon since we use some acceptance tests

or

  • https://github.com/ember-cli/ember-addon-blueprint - doesn't support acceptance test

I have a slight supposition that it would have to be combination of latter in monorepo setup like:

addon - generated with https://github.com/ember-cli/ember-addon-blueprint test-app - just an ember app with ember try node-test ?

aklkv avatar Jun 05 '25 20:06 aklkv

doesn't support acceptance test

why do you say this? you can do application tests still

NullVoxPopuli avatar Jun 05 '25 20:06 NullVoxPopuli

oh does it, I thought it doesn't. I can give it a try then. tho judging by this https://github.com/ember-cli/ember-addon-blueprint/pull/41 scenario testing is not in yet?

aklkv avatar Jun 05 '25 20:06 aklkv

it is now! in 0.6.0

NullVoxPopuli avatar Jun 05 '25 21:06 NullVoxPopuli

if only there was a codemod for this migration 🤔

aklkv avatar Jun 05 '25 21:06 aklkv

I just ran in to an issue where on a non-minimal v2 app, with the compat stuff, ember-a11y-testing wouldn't work.

it seemed to be an issue with axe-core, but I didn't want to debug it because I don't actually know if ember-a11y-testing is meant to work with vite right now.

NullVoxPopuli avatar Jul 15 '25 22:07 NullVoxPopuli

nevermind! it was this issue: https://github.com/rollup/rollup/issues/6012

NullVoxPopuli avatar Jul 16 '25 15:07 NullVoxPopuli