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

Consider returning text in a default export #2

Open
CyberAP opened this issue Aug 15, 2022 · 2 comments
Open

Consider returning text in a default export #2

CyberAP opened this issue Aug 15, 2022 · 2 comments

Comments

@CyberAP
Copy link

CyberAP commented Aug 15, 2022

This will be very convenient to migrate off the webpack's raw-loader for specific file types, which always return a default export from them.

Before

import { plainText } from 'some-file';

After

import plainText from 'some-file';
@zheeeng
Copy link
Owner

zheeeng commented Aug 16, 2022

IMO default exporting is a bad practice in most scenarios and often causes wired problems. I vote for keeping using named exporting.

@zheeeng
Copy link
Owner

zheeeng commented Feb 1, 2023

The latest release 1.4.0 supported configuring the export ways. For your demand try passing the { namedExport: false }.

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

No branches or pull requests

2 participants