I am creating an aurelia user element library for use by several different aurelia applications, and I have run into difficulties with having the html user element connected to the application set correctly using the CLI process.
Currently, I think the library will be part of package.json and thus is listed in the node_modules / my-lib section. What the supplied .html format should do
<template>...</template>
or it must be delivered in the required format
define('text!my-lib/component1.html', ['module'], function(module) { module.exports = "<template>\r\n ...
If the first one, what did I put in aurelia.json so that it is correctly included in the supplier kit?
If I search for ['../node_modules/my-lib/**/*. html '] in the my-lib dependency section - it is included as html in the js file that throws an error.
If I add a provider package as a source or using my-my-lib-bundle.js native package
"source": [ "[../node_modules/my-lib/**/*.js]", "../node_modules/my-lib/**/*.{css,html}" ],
Nothing is included, except for the "main" specified in one dependency.
If I add to markupProcess (which is more related to the application, not the library)
"markupProcessor": { "id": "none", "displayName": "None", "fileExtension": ".html", "source": [ "src\\**\\*.html", "..\\node_modules\\my-lib\\**\\*.html" ] },
I get html added correctly in app-bundle but have the wrong path because it contains "../ node_modules" in the definition so that it is not detected when the application tries to use it.
I do not use the CLI to build my library, because I want the application to include only the parts that it uses. So, JS is built and delivered in AMD format, but I was not sure that the process would go through HTML?
Suggestions?