Skip to content

Proposal: Improve developer experience by migrating to SWC or esbuild for faster transpiling #239

@clemgbld

Description

@clemgbld

Hello Passbolt team,

I'm proposing a change to the build system to significantly improve development speed.
Moving from a JavaScript-based transpiler like Babel to a Rust-based one like SWC or Go-based one like esbuild could drastically reduce transpiling times, making the development loop faster and more efficient.

This migration is a low-effort, high-reward task.
It primarily involves a simple loader swap within webpack with minimal configuration changes.

This change would involve:

  1. Adding @swc/core and swc-loader to the project's dependencies.
  2. Updating the existing webpack configurations to replace babel-loader with swc-loader.
  3. Configuring SWC to handle the necessary transformations (e.g., modern JavaScript syntax, React).

Benefits:

  • Faster Development: Shorter wait times for builds and live reloads.
  • Future-Proofing: Align the project with modern web development transpiling tools.
  • Fewer Dev dependencies: Unlike babel swc or esbuild only require 1 to 2 dev dependencies.

I would be happy to help with a pull request if this proposal is something the team is interested in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions