vue-test-utils-compat icon indicating copy to clipboard operation
vue-test-utils-compat copied to clipboard

Support for CommonJS

Open CyberAP opened this issue 4 years ago • 1 comments

Right now VTUC only supports ES Modules, but not every nodejs environment supports these types of modules and does require a compilation step. It would provide a much better developer experience if it could support CommonJS modules as well.

It would also go well with the readme which uses CommonJS import style.

As a temporary solution you might use this in your jest.config.js if you're using Jest of course:

module.exports = {
  transformIgnorePatterns: ['/node_modules/(?!vue-test-utils-compat)'],
}

CyberAP avatar Nov 24 '21 18:11 CyberAP

+1 on this. I couldn't even get jest to transpile this package with transformIgnorePatterns and wasn't able to figure out why, so I ended up just copying the code into my own project.

snoozbuster avatar May 27 '22 22:05 snoozbuster