•  
      request #19287 Make internal libs "tree-shakeable"
    Infos
    #19287
    Thomas Gerbet (tgerbet)
    2021-03-01 17:16
    2021-02-09 18:39
    20863
    Details
    Make internal libs "tree-shakeable"
    Currently the internal libs we build in the Tuleap repo cannot be tree-shaken because they are only delivered as UMD. This means that they need to be bundled entirely when they are imported into the other apps resulting in bigger than needed apps (which is bad for performance) and can even be a source of issue (e.g. git #tuleap/stable/c59f4e68e7c6a9f22587996b9953075f90816c24).

    To be "tree-shakeable" we need to build our libraries as ES modules. Unfortunately, Webpack is not capable to do that at the moment [0] so we need to use another tool. It feels like an opportunity to test Vite [1].




    [0] https://github.com/webpack/webpack/issues/2933
    [1] https://vitejs.dev/
    Other
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2021-02-24
    Attachments
    Empty
    References
    Referencing request #19287

    Git commit

    tuleap/tuleap/stable

    Build the BreadcrumbPrivacy lib as a ES module 10a66fb856
    Build the tlp-fetch lib as a ES module fe33c9cd60
    Build @tuleap/gettext lib as a ES module 45ec3e42c6
    Build the @tuleap/date-helper as a ES module 5872b949ed
    vite: 2.0.0-beta.69 -> 2.0.1 && vite-plugin-vue2: 1.2.0 -> 1.2.1 6555f33d8b
    Build the @tuleap/ckeditor-image-upload lib as a ES module b008160195
    Build the @tuleap/filter-inline-table as a ES module 934c75f572
    Replace concurrently by npm-run-all 36b0f3c507
    Build the @tuleap/list-picker lib as a ES module f48ef670ca
    Inherit configuration centrally for vite 70e103e57f
    Build @tuleap/ckeditor-image-upload-form as a ES module 24ec527b53
    Build the @tuleap/angular-async as a ES module da1eff573a
    Build the @tuleap/plugin-tracker-rich-text-editor as a ES module 1032d7d560
    Build the @tuleap/angular-tlp as a ES module 7bd524fe02
    request #19382: Display a big "Unsupported browser" at the top of the pages when IE is used 06211ad928
    Build the @tuleap/plugin-agiledashboard-card-fields lib as a ES module c80a6ce201
    Allow the baseline to build when using the vue-breadcrumb-privacy app as a ES module 2a3557d7f7

    Follow-ups

    User avatar
    Joris MASSON (jmasson)2021-02-24 15:16
    Only card fields remains built by webpack, but this requires investigation and possibly writing a plugin. Let's close this request, we can open another one.

    • Status changed from Under implementation to Closed
    • Close date set to 2021-02-24