typy icon indicating copy to clipboard operation
typy copied to clipboard

How to import files without extensions?

Open pitymaia opened this issue 6 years ago • 1 comments

Hi, I discovered Typy a little while ago and thought it will help immensely to ensure the quality of my code. My colleague and I chatted and decided to add Typy to an ES6 Web project we're working on, but when I did that, I ran into a problem with the lack of filename extension for imports.

I'm new to ES6 so I didn't understand exactly why you did it this way, because browsers seem to require file name extensions. So if possible I would like some guidance on how I should introduce Typy to my web project.

Should I use some transpile to add the extension or is there any other technique I can use? I just hope I don't have to resort to using some kind of Apache server rewrite.

Thanks for listening.

pitymaia avatar Aug 08 '19 04:08 pitymaia

@pitymaia If you're trying to load the file directly from a URL, you could try unpkg CDN.

Here's the URL —

https://unpkg.com/[email protected]/lib/index.js

flexdinesh avatar Aug 10 '19 05:08 flexdinesh