File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ jobs:
171171 run : pnpm --filter '*${{ matrix.e2e-framework }}*' --filter '!*bare*' --workspace-concurrency 1 test:e2e
172172
173173 - name : Cypress component testing for projects without Vitest
174+ working-directory : ./playground
174175 if : ${{ contains(matrix.e2e-framework, 'cypress') }}
175176 run : pnpm --filter '*cypress*' --filter '!*vitest*' --workspace-concurrency 1 test:unit
176177
Original file line number Diff line number Diff line change @@ -628,7 +628,7 @@ async function init() {
628628 }
629629
630630 if ( argv . bare ) {
631- removeCSSImport ( root , needsTypeScript )
631+ removeCSSImport ( root , needsTypeScript , needsCypressCT )
632632 if ( needsRouter ) {
633633 emptyRouterConfig ( root , needsTypeScript )
634634 }
Original file line number Diff line number Diff line change @@ -20,10 +20,24 @@ export function trimBoilerplate(rootDir: string) {
2020 }
2121}
2222
23- export function removeCSSImport ( rootDir : string , needsTypeScript : boolean ) {
23+ export function removeCSSImport (
24+ rootDir : string ,
25+ needsTypeScript : boolean ,
26+ needsCypressCT : boolean ,
27+ ) {
2428 // Remove CSS import in the entry file
2529 const entryPath = path . resolve ( rootDir , needsTypeScript ? 'src/main.ts' : 'src/main.js' )
2630 replaceContent ( entryPath , ( content ) => content . replace ( "import './assets/main.css'\n\n" , '' ) )
31+
32+ if ( needsCypressCT ) {
33+ const ctSetupPath = path . resolve (
34+ rootDir ,
35+ needsTypeScript ? 'cypress/support/component.ts' : 'cypress/support/component.js' ,
36+ )
37+ replaceContent ( ctSetupPath , ( content ) =>
38+ content . replace ( "import '@/assets/main.css'" , "// import '@/assets/main.css'" ) ,
39+ )
40+ }
2741}
2842
2943export function emptyRouterConfig ( rootDir : string , needsTypeScript : boolean ) {
You can’t perform that action at this time.
0 commit comments