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

add support for extension less JavaScript / CSS files (JS files "in disguise") #700

Closed
1 of 5 tasks
thescientist13 opened this issue Aug 20, 2021 · 1 comment · Fixed by #747
Closed
1 of 5 tasks
Assignees
Labels
alpha.0 CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins v0.18.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Aug 20, 2021

Type of Change

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

Summary

As part of testing out integration with Material Web Components in ProjectEvergreen/greenwood-getting-started#42, it was observed that some tools are not including an extension which causes a couple issues

  • CSS files that are supposed to be treated as JS files will not return correctly
  • JS files that are actually there will not return correctly

Basically, MWC will reference a CSS file as such in JavaScript

.
.
import { styles } from './styles.css';

But the actual file exists as styles.css.js.

Details

As this is non standard behavior, the CSS support should be put into plugin-import-css and for JavaScript, I think it is fine (for now) to include in plugin-node-modules since bare specifiers are the norm there.

@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins CLI labels Aug 20, 2021
@thescientist13 thescientist13 added this to the 1.0 milestone Aug 20, 2021
@thescientist13 thescientist13 self-assigned this Aug 20, 2021
@thescientist13
Copy link
Member Author

Or at least document something since this kind of error for a missing .js extension is definitely not helpful / insightful
greenwood-faq-no-file-extension-console
greenwood-faq-no-file-extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.0 CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins v0.18.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant