Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure a clear and consistent convention for when to use file extensions #536

Closed
1 of 5 tasks
thescientist13 opened this issue Apr 11, 2021 · 0 comments · Fixed by #707 or #815
Closed
1 of 5 tasks

ensure a clear and consistent convention for when to use file extensions #536

thescientist13 opened this issue Apr 11, 2021 · 0 comments · Fixed by #707 or #815

Comments

@thescientist13
Copy link
Member

thescientist13 commented Apr 11, 2021

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

The ESM spec requires file extensions, but almost all developers expect to be able to

import { something } from 'foo';

This is typically true of modules in node_modules, but this will break if you are trying to access a file in your own project. ex.

import { something } from '/components/footer/footer';

Details

The first case works because of the importMap but we should probably establish a singe default way of doing things, or at least clear explanation of when if we need to support both. Or maybe an opportunity for a plugin for extension-less files, like in webpack?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Greenwood specific docs v0.20.0
Projects
No open projects
1 participant