Hi i have downloaded the hello world aurelia skelton plugin from https://github.com/aurelia/skeleton-plugin . i then reference this from the package.json file in a fresh copy of the aurelia esnext/webpack skelton (https://github.com/aurelia/skeleton-navigation/tree/master/skeleton-esnext-webpack) as my main app. i can then use the plugin in one of my components with
<require from="aurelia-skeleton-plugin/hello-world"></require>
at the top of the view and placing <hello-world></hello-world>
anywhere on the view. this works great.
next step i want to try is adding a custom attribute to my plugin. in the src folder of my plugin i added the simple custom attribute
export class RedSquareCustomAttribute {
static inject = [Element];
constructor(element){
this.element = element;
this.element.style.width = this.element.style.height = '100px';
this.element.style.backgroundColor = 'red';
}
}
i then reference this in my hello-world.html page with the following code
<require from="./red-square"></require>
<div red-square></div>
run gulp build, then reinstall the package in my main app. in the main app npm start builds ok but the browser gives me the error: Cannot find module './aurelia-skeleton-plugin/red-square'
ive read lots of docs but nothing gives an example of this scenario and any help would be greatly appreciated.
red-square.js
? – 8protons