Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
ui-components
ui-components
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 4
    • Merge Requests 4
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linguala
  • ui-componentsui-components
  • Issues
  • #60

Closed
Open
Opened May 24, 2020 by Tobias Thüring@tth💬Owner

Feature: Switch to es module exports

We currently bundle to es modules and commonjs with rollup.

This could stay, but our code has still to be transformed with babel to commonjs (require() syntax) or processed in storybook with webpack with es compatible module loaders in storybook (related to #52 and #13 (closed)).

This increases build-time and once storybook is compatible with mjs (probably @storybook/react@6.0.0), we should switch the sources to mjs file extensions to use modules natively with node 14+ for all other javascript file extensions than jsx.

jsx

.jsx still requires a transformer to .js or .mjs.

Once storybook does not rely on the webpack package resolver (which is not compatible to native es-modules yet), we can switch fully to a non-babel setup and only transpile jsx.

other file extensions

Other file extensions for images or fonts should come from external packages bundled to js and be added as peerDependencies.

Edited May 26, 2020 by Tobias Thüring
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: linguala/ui-components#60