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

[Bug]: NPM Packages is missing extensions in imports/exports #33521

Open
2 tasks done
jogibear9988 opened this issue Dec 27, 2024 · 1 comment
Open
2 tasks done

[Bug]: NPM Packages is missing extensions in imports/exports #33521

jogibear9988 opened this issue Dec 27, 2024 · 1 comment
Assignees

Comments

@jogibear9988
Copy link

Component

Other...

Package version

2.6.1

@microsoft/fast-element version

unkown

Environment

directly imported in browser

Current Behavior

You .js files in the package do not contain extension in import / export statements.
So your package does only work when used with a bundler, but not directly in the browser.

Expected Behavior

The .js files should contain relative paths with extensions, or the paths need to be listed in the exports section of the package.json

Reproduction

https://js-b7swbe.stackblitz.io

Steps to reproduce

  1. goto: https://node-projects.github.io/web-component-designer-demo/index.html
  2. enter "@fluentui/web-components" in the text box for a npm package
  3. press enter
  4. look in console, you see we could not load package cause of errors with missing .js extension

Are you reporting an Accessibility issue?

None

Suggested severity

High - No workaround

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@sopranopillow
Copy link
Contributor

Assigning to @chrisdholt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants