-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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?]: #3879
Comments
If See https://yarnpkg.com/advanced/rulebook/#packages-should-only-ever-require-what-they-formally-list-in-their-dependencies for more details on hoisting |
@merceyz thanks for a quick reply! OK, I can use a create-require hack, just to get module.exports = async (url) => (await import(url)).default; And I can publish new version of 🐊
|
With your current dependency tree that might be true but that isn't guaranteed and, like the documentation I linked shows, can break by unrelated changes to the dependency tree.
The |
@merceyz thank you! I think this information could be important for @sindresorhus (there is no ability to create an issue in |
@coderaiser Looking through some of the closed issues over at chalk, I guess chalk is taking a hard stance on not wanting to support people not supporting imports and exports in their package.json. They would rather you just use chalk v4 I suppose. 😕 Surprising given how many projects use chalk. 😬 |
Self-service
Describe the bug
When I'm using 🐊
Putout
code transformer withyarn P'n'P
I got an error:The thing is
simport
is a module that improves dynamic imports in a couple ways:You can use:
default
:json
files, like withrequire
.So
simport
should not know about any dependency it is used for. Would be great to have first class support of it :)! Without using loose mode.Related to coderaiser/putout#93, EvgenyOrekhov/eslint-config-hardcore#399
To reproduce
Steps to reproduce:
git clone https://github.com/EvgenyOrekhov/putout-yarn3.git
cd putout-yarn3
yarn
yarn putout .
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: