Hello,
I am trying to create an Element Library ( npm package “my-element-library” ) composed of Aurelia Elements. I have tries searching how to create something like this and everything points me to create a plugin, so I started creating a plugin.
I have a model-view at path ./elements/video-player/video-player
of the plugin project and this is my index.ts
import process from 'process';
window.process = process;
import { FrameworkConfiguration } from 'aurelia-framework';
import { PLATFORM } from 'aurelia-pal';
export function configure(config: FrameworkConfiguration) {
config.globalResources([
PLATFORM.moduleName('./elements/video-player/video-player'),
]);
}
export * from "'./elements/video-player/video-player'";
I build the plugin and installed it in another aurelia project, I try to install the plugin by doing
aurelia.user.plugin(PLATFORM.moduleName('my-element-library'))
now I have two problems, if I do the above it causes an error while building
Can't figure out a normalized module name for ./elements/video-player/video-player, please call PLATFORM.moduleName() somewhere to help.
The second one is I tried to extend the VideoPlayer
element inside the project to create new element ExtendedVideoPlayer
and it still causes the same error as above.
Am I doing something wrong?