question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate to `webpack`

See original GitHub issue

Status PoC

We are currently using rollup for bundling. Though we never faced a major issue with it, rollup is built for libraries which are node focuses not the browser. We will be using rollup for our CLI project but as docsify is browser library, I would prefer to migrate to webpack like its always recommended to use webpack for browser code.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jhildenbiddlecommented, Jun 6, 2020

The general advise for people asking “rollup or webpack?” has been use to use rollup for distributable packages (browser and/or node) and webpack for applications. This advise was given early on mostly due to webpack v2’s inability to output ES6 modules, but it largely holds true today as rollup is typically faster and produces smaller bundle sizes while webpack tends to be more flexible for app-specific use cases like code splitting. Given this advise and without any other information or preferences to consider, Rollup would typically be the first choice for a distributed bundle like docsify’s.

My preference would be to 1) lower the priority of this task in favor of user-facing issues and 2) commit only to exploring webpack as an option if/when time allows or the need presents itself. Once we have separate webpack and rollup builds available we can compare build time, bundle size, learning curve, features, concerns, etc.

1reaction
trusktrcommented, Jun 10, 2020

I don’t think we need to switch to Rollup. We learnt about the caveat (it treats missing dependencies as warnings), so now we know. And now we also have a tests in place to catch missing dependencies once I get a second review so I can merge #1189.

Also, we can add this config to Rollup to throw an error instead of a warning: https://github.com/rollup/rollup/issues/1906#issuecomment-561055996

I think we should close this, as we don’t have a need to convert to Webpack. Let’s re-open this if/when someone needs to convert to Webpack for some reason.

Let’s focus on features/improvements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate - webpack
This section contains information about migrating from older versions of webpack to newer ones. Edit this page·Print this page.
Read more >
Webpack 5 Migration - Medium
Webpack is a static module bundler for modern JavaScript applications and is the core of a project. It is now available with new...
Read more >
Migrating to webpack 5 to improve build time and reduce ...
Webpack migration from v4 to v5 is not just upgrading the webpack version, it's about migrating all the plugins and loaders to their...
Read more >
Migrate from Webpack to Remix
Today, we're excited to share a way for Webpack-based apps to incrementally migrate to Remix. We've created an example of a Webpack-based ...
Read more >
Migrate from Webpack to Turbopack - Turborepo
Currently, migrating to Turbopack from Webpack is not yet possible. In the future, we're planning to offer a smooth migration path for all ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found