module loader to be imported in skeletons
npm install @netvlies/wsc-js-moduleloaderThe purpose of this module is to abstract the module loader and base module components so they can be implemented independently.
The module can be installed by running:
npm i -D @netvlies/wsc-js-moduleloader
Create custom modules in your HTML using a web component (default: ). It is best-practice to prefix them with nvs for readability and consistency throughout our projects.
``html`
...
Loop through your custom webcomponents in your source code using this setup:
`js
import Nav from './modules/Nav';
const webComponents = [Nav];
for (const { element, module } of webComponents) {
customElements.define(element, module);
}
`
Create the modules using the default framework in the [Base module] which can be found in the lib folder.
`html``
...