How to use aurelia-web-component to export custom element and used by other framework

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")));
}
1 Like

At the moment, aurelia-web-component requires aurelia runtime, so it makes less sense to export it into another framework. But it can probably be done.

You will find the compiled code in the dist folder, available in module formats: UMD, AMD, CommonJS and ES6.”

This is about developing the library itself, not how it will be used in your application.

I guess we can say that the Aurelia runtime is of medium size that it’s more suitable to run as the main framework of an application, rather than to be used as a drop in component library without a runtime.