frontend-boilerplate icon indicating copy to clipboard operation
frontend-boilerplate copied to clipboard

Webpack / Rollup Version

Open hirbod opened this issue 3 years ago • 2 comments

Hi,

do you guys have a webpack/rollup version of this boilerplate laying around somewhere? I think this setup with browserify got a bit outdated and now I've been working with it quite a while, compiling time is terrible due to missing HMR, and its so slow on bigger websites and it lacks of good tree shaking (even with extra browserify plugins).

The most lovely part of this template is the documentation generation, thats the only thing that actually keeps me here. Was hoping you guys might have something ready in your pocket :)

hirbod avatar Aug 22 '20 19:08 hirbod

Hi @Hirbod, thanks for reaching out. Switching to Webpack is something I've been thinking about because of the reasons you mentioned (and also because it would make working with partial React codebases easier). While I can't promise anything, I'll definitely discuss it with the team :)

colin-aarts avatar Aug 24 '20 10:08 colin-aarts

That would be lovely. I'm here if you need a beta tester. My project is pretty big and my bundle is 620KB now uncompressed + 180KB polyfills, get reduced by ~80KB after tree shaking in production with some modifications

    opts.plugin = opts.plugin.concat('common-shakeify')
    opts.plugin = opts.plugin.concat('browser-pack-flat/plugin')
    opts.transform = opts.transform.concat('unassertify')
    opts.transform = opts.transform.concat('uglifyify')

But still needs around ~12 seconds to reload on every change, lack of code splitting and mostly hot module reloading. I think benefits with webpack4 are huge now @colin-aarts :)

hirbod avatar Aug 24 '20 16:08 hirbod