Because player.style doesn't currently export CommonJS modules, when importing player.style themes into a project using TypeScript, you might get an error that looks like this:
Cannot find module 'player.style/microvideo' or its corresponding type declarations.
The "fix" for this currently is to make sure that:
You are importing the theme into a Javascript Module file and not a CommonJS file. Either by using the the package.json "type": "module" for the whole project. Or, the .mts extension for the file
Setting module in tsconfig is to nodenext
This might not work for all setups / bundlers / frameworks, etc. Alternatively, you may need to:
Make sure you are on TypeScript 5.x.x
use the new tsconfig "moduleResolution": "bundler" option, as documented here in TypeScript's release notes
Because player.style doesn't currently export CommonJS modules, when importing player.style themes into a project using TypeScript, you might get an error that looks like this:
The "fix" for this currently is to make sure that:
"type": "module"
for the whole project. Or, the.mts
extension for the filemodule
in tsconfig is tonodenext
This might not work for all setups / bundlers / frameworks, etc. Alternatively, you may need to:
"moduleResolution": "bundler"
option, as documented here in TypeScript's release notes