I am trying to use aurelia-web-components to export a simple custom element into web component in order to use by other framework. My project just has one component under src/resource/elements folder and I followed the instructions under aurelia-web-components - npm. After running “npm run build”, the dist folder just contains a bunch of app and vendors chunk js files. Where are the “You will find the compiled code in the dist folder, available in module formats: UMD, AMD, CommonJS and ES6.”? How do I distribute the exported web components to other framework, such as React? Is it even possible to do so?
Here is my main.js file:
import * as environment from "../config/environment.json";
import { PLATFORM } from "aurelia-pal";
import { CustomElementRegistry } from "aurelia-web-components";
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.globalResources("resources/elements/message-parts");
// .feature(PLATFORM.moduleName('resources/index'));
aurelia.use.developmentLogging(environment.debug ? "debug" : "warn");
if (environment.testing) {
aurelia.use.plugin(PLATFORM.moduleName("aurelia-testing"));
}
aurelia
.start()
.then(() => {
const registry = aurelia.container.get(CustomElementRegistry);
registry.useGlobalElements();
})
.then(() => aurelia.setRoot(PLATFORM.moduleName("app")));
}