11import path from 'node:path' ;
2+ import { fileURLToPath } from 'node:url' ;
23import { rollup } from 'rollup' ;
34import lwcRollupPlugin from '@lwc/rollup-plugin' ;
45
@@ -9,6 +10,8 @@ import {
910 DISABLE_SYNTHETIC_SHADOW_SUPPORT_IN_COMPILER ,
1011} from '../../helpers/options.js' ;
1112
13+ const UTILS = fileURLToPath ( new URL ( '../../helpers/utils.js' , import . meta. url ) ) ;
14+
1215/** Cache reused between each compilation to speed up the compilation time. */
1316let cache ;
1417
@@ -22,7 +25,7 @@ const createRollupPlugin = (input, options) => {
2225 // Sourcemaps don't work with Istanbul coverage
2326 sourcemap : ! process . env . COVERAGE ,
2427 experimentalDynamicComponent : {
25- loader : 'test-utils' ,
28+ loader : UTILS ,
2629 strict : true ,
2730 } ,
2831 enableDynamicComponents : true ,
@@ -85,7 +88,7 @@ const transform = async (ctx) => {
8588
8689 // Rollup should not attempt to resolve the engine and the test utils, Karma takes care of injecting it
8790 // globally in the page before running the tests.
88- external : [ 'lwc' , 'wire-service' , 'test-utils' , ' @test/loader'] ,
91+ external : [ 'lwc' , 'wire-service' , '@test/loader' , UTILS ] ,
8992
9093 onwarn ( warning , warn ) {
9194 // Ignore warnings from our own Rollup plugin
0 commit comments