ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.5k stars 784 forks source link

Cannot import a JS file into a stencil component #318

Closed jgw96 closed 6 years ago

jgw96 commented 6 years ago

Stencil version:

 @stencil/core@0.0.8-5

I'm submitting a:

Current behavior:

I am importing a JS file into a Stencil component with the following import statement import { dateFormat } from '../../utils/dateFormat'; . When i try to compile this (npm run dev) it throws the following error:

[ ERROR ]  Error parsing: 
           /Users/justinwillis/Projects/ionic-webcomponents-conference/dist/collection/components/session-list/session-list.js,
           line: 2, column: 9 

If we then look in dist/collection it's creating a folder called dateFormat with an empty index file. If i convert this dateFormat file to typescript then it works.

Expected behavior:

Able to import a JS file.

Steps to reproduce:

Related code:

Other information:

jgw96 commented 6 years ago

Closing this as I can no longer reproduce this issue.