Support for importing multiple modules from a library with ONE statement
Open
Nobody has claimed this yet.
enhancement
types
- Dominant language
- TypeScript
- Stars
- 213
- Forks
- 35
- Avg merge
- 37m
- Merged PRs (30d)
- 1
Description
Hi,
I just noticed that (control) imports cannot use tree shaking atm.
This means you need to write a very long "import header" like:
import MessageBox from "sap/m/MessageBox";
import Button from "sap/m/Button";
import MessageToast from "sap/m/MessageToast";
import Select from "sap/m/Select";
and cannot simplify write some short and concise code like:
import {MessageBox, Button, MessageToast, Select} from "sap/m";
Are there any plans to support this in the future?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source files, tests, or entry points. Start by locating how control imports are parsed and resolved, then determine how a single library import could expose the named modules while preserving tree shaking. Done means the concise import form works for the shown controls without requiring separate import statements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100