Console warning
rslibed opened this issue · comments
Ryan Libed commented
Stencil version:
@stencil/webpack@0.0.6
I'm submitting a ...
[ x ] bug report
[ ] feature request
Current behavior:
When using StencilJS Components in a Webpack app. Warning displays in the console:
To improve performance it is recommended to set the differential scripts in the head as follows:
<script type="module" src="<path-to-package>/dist/test/test.esm.js"></script>
<script nomodule="" src="<path-to-package>/dist/test/test.js"></script>
Expected behavior:
Warning does not display in the console.
Ryan Libed commented
Solution:
// Webpack entry file index.ts
import { defineCustomElements as fooBar } from 'foo/bar/dist/loader';
fooBar(window).then(() => {
// Initialize app here
});
Console warnings no longer display.