es-dev-commonjs-transformer
CommonJS Module transformer for the es-dev-server. It converts modules cjs -> esm format. Uses Rollup commonjs plugin under the hood.
// Inconst a = ;...moduleexports = a;
// Out;...;
General Usage
//es-dev-server.config.js ; moduleexports = responseTransformers:
OpenWC Karma Testing Setup
The Open-wc karma setup requires you to exlude some paths from being processed by the cjs transformer. The following excludes seems to have worked for me.
//karma.conf.ts const cjsTransformer = ;const createDefaultConfig = ; module { let defaultConfig = ; ... esm: responseTransformers: }