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

error instead of warn for missing exports #2157

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

amk221
Copy link

@amk221 amk221 commented Oct 23, 2024

Currently, this:

import { foo } from 'bar';

will cause Webpack to warn if foo does not exist, but this is easily missed. Meaning its possible to ship broken code.

This PR configures strictExportPresence to error instead of warn.

But this is actually deprecated in favour of exportsPresence, which I did try but it wasn't available on the current version.

Also note it will be true by default in v6 of webpack anyway.

Reading:


Regarding tests, since I'm not familiar with the embroider repo I found it hard to know where they should go. I saw some that seemed like an appropriate place, but I'll need help tbh.

@amk221 amk221 marked this pull request as ready for review October 24, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant