BoostV / process-optimizer-frontend

A web frontend for ProcessOptimizer
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Bundling tss-react in UI package breaks client tests #232

Closed langdal closed 1 year ago

langdal commented 1 year ago

The externalization of tss-react causes errors when running test in consuming clients using vitest as test runner.

Example of error message:

SyntaxError: Named export 'makeStyles' not found. The requested module 'tss-react/mui' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'tss-react/mui';
const { makeStyles } = pkg;