ionic-team / stencil-webpack

Tools needed to include stencil components in a project built using Webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Console warning

rslibed opened this issue · comments

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.

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.