Package Exports
- cem-plugin-complex-types
- cem-plugin-complex-types/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cem-plugin-complex-types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cem-plugin-complex-types
This custom elements manifest analyzer plugin adds support for resolving complex types in custom element properties

Installation
npm install --save-dev cem-plugin-complex-types- Add
cem-plugin-complex-typesto your cem config - Link a css file in your storybook's
preview-head.html
// custom-elements-manifest.config.mjs
export default {
// ...
plugins: [
// ...
cemPluginComplexTypes(['./src/**/*.ts']),
],
};// custom-elements-manifest.config.mjs
<link rel="stylesheet" href="node_modules/cem-plugin-complex-types/preview-head-fix.css" />FAQ
(Click on a question to see the answer.)
Q: Can it handle classes, interfaces, unions as well as primitive types?
A: Yes, the plugin should be able to handle all of these types. It will resolve the type to its source code and display it in the Storybook addon panel. If the type is a class or interface, it will show the properties and methods of that type. If it's a union type, it will show all possible types in the union.
Contributing
We encourage you to contribute to this project! Please check out the Contributing guide for guidelines about how to proceed and how to set up your dev environment. Join us!
License
CEM-Plugin-Complex-Types is released under the MIT License.