Handle custom groups
See original GitHub issueNowadays, absolute imports is a very popular thing, as well as monorepos with different features “stored” as a separate packages. However they are not packages.
Webpack aliases and yarn workspaces are breaking original idea behind the “groups” feature.
import React from 'react'; // 1. "external" package
import Button from 'components/Button'; // 2. "internal" package (or just an absolute URL)
import style from './style'; // 3. "relative" module
import "./messages"; // 4. side effect
Technically these are:
- packages in
node_modules
- packages not in
node_modules
- relative path
- no import
2
could be distinguished from1
by callingrequire.resolve
and checking path to includenode_modules
(obvious)2
could be distinguished from1
by having some configuration rules, but I reckon it’s not feature proof and quite fragile.
I could work on PR if you’ll accept the idea
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Manage custom groups (beta) - Mattermost Documentation
To manage a custom user group, select User Groups from the Products menu, then select the group you want to modify.
Read more >Create and Manage Custom Groups | Dell US
This article provides information about how to create and manage custom groups to help customize your online support experience.
Read more >How to manage custom groups - NWEA Connection
How to manage custom groups for use in MAP Skills. ... Select Manage Custom Groups in the main navigation menu.
Read more >Create & Manage Custom Groups - Teamworks Support
To create a custom group, log into your Teamworks account in a web browser and navigate to the Profiles tab. Select the “Custom...
Read more >Creating custom groups - ManageEngine Device Control Plus
Create a Custom Group · Select the Admin tab · Click the Custom Groups link available under the Global Settings. This will list...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now possible in v5.0.0 using custom grouping.
For example:
module name
node_modules
(but I think it would be the first case) - it is an absolute import. Only the “real packages” would be resolved.Thus the problem could be solved without any configuration needed from a user.