4 ms·
> - "export already_imported_variable;" - why the HECK is this not in the specification? Having to declare new variable names for exports makes the creation of
by Ginden 5y ago
> - "export already_imported_variable;" - why the HECK is this not in the specification? Having to declare new variable names for exports makes the creation of "index" files so damn painful. This syntax could fix this.
You can do:
export {already_imported_variable}
- cookiengineer 5y ago...which is a default export, not a named export, as I already explained. My point was about the lack of exporting named exports without the need to declare variable names. Your solution will work only once in a file, therefore it is useless to batch-export lots of imports for the mentioned use case of an "index" file that exports all your classes and definitions.
- Ginden 5y agoIt isn't default export, as you can see here: https://babeljs.io/repl#?browsers=node16&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=JYWwDg9gTgLgBAbwGYQgXzkqERwOQBGAhgF54DcAUAKYAeksiK6QA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=false&presets=es2015&prettier=false&targets=&version=7.16.2&externalPlugins=&assumptions=%7B%7D https://babeljs.io/repl#?browsers=node16&build=&builtIns=fal...