I am playing with stencil What I have done so far:
When I am adding
<script src="/node_modules/stencil-poc-ng/dist/mycomponent.js"></script>
then brower console giving the following error:
GET http://localhost:4200/node_modules/stencil-poc-ng/dist/mycomponent.js 404 (Not Found) localhost/:1 Refused to execute script from 'http://localhost:4200/node_modules/stencil-poc-ng/dist/mycomponent.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
You are building an Angular app, it won't be able to access a local path on your computer when running on your browser.
What Angular ng serve
does:
Only the "in memory" files are served, then your http://localhost:4200/node_modules/stencil-poc-ng/dist/mycomponent.js
will always be invalid
You have only two options left:
<script src='https://unpkg.com/stencil-poc-ng@0.0.1/dist/mycomponent.js'></script>