将模板与HTML集成

时间:2020-04-21 14:08:39

标签: html http stenciljs stencil-component

我在js模板上有正在运行的组件。 现在我想在我的HTMl组件中使用它,但是我不能这样做。

代码:

<html>
    <head>
    <script type="module" src="http://build/test.esm.js"></script>
<script nomodule src="http://build/test.esm.js"></script>
    </head>
    <body>

        <my-form></my-form>
    </body>
</html>

我收到CORS错误。 它需要http url。 如何生成。

谢谢

0 个答案:

没有答案