stencil-community / stencil-router

A simple router for Stencil apps and sites

Home Page:https://stenciljs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ES import in webpack project does not work out of box

blikblum opened this issue · comments

Resources:
Before submitting an issue, please consult our docs. [x] Done

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

@stencil/router: 1.0.1

I'm submitting a ... (check one with "x")
[x] bug report / incomplete documentation
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com

Current behavior:
When using @stencil/router in a webpack project is not enough to add import to load the components

import '@stencil/router'

Expected behavior:

import '@stencil/router' in a webpack project should load the components or documentation should be provided how to use with webpack

Other information:

The below code works:

import { defineCustomElements } from '@stencil/router/dist/esm/loader.mjs'
defineCustomElements()

At least some kind of documentation should be provided in this project wiki or https://stenciljs.com/docs/module-bundling or https://stenciljs.com/docs/distribution