Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Webpack #59

Closed
nizniz187 opened this issue Jul 20, 2021 · 2 comments
Closed

Introduce Webpack #59

nizniz187 opened this issue Jul 20, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@nizniz187
Copy link
Contributor

Use Webpack as the project build tool

@nizniz187 nizniz187 self-assigned this Jul 20, 2021
@nizniz187 nizniz187 added the enhancement New feature or request label Jul 20, 2021
@nizniz187 nizniz187 added this to the Architecture milestone Jul 20, 2021
@nizniz187
Copy link
Contributor Author

nizniz187 commented Jul 24, 2021

ES Module export support is still an experimental feature, which is very basic and unstable.
Reference:


As the merits we expect this WC library we are building on should bear with --modern, light, and flexible-- we should re-consider if we are going to use Webpack as the bundling tool.

To sum up, the main reasons why we want to introduce Webpack are:

  1. To bundle with 3rd-party libraries for some of our component features, such as code highlighting. (Add Basic Component - Code #17)
  2. To solve the problem of component load delay. (Solve Loading Delay Problem #34)

And the options we have now are:

  1. Keep using Webpack with common js library export.
    • Can solve the library bundling. (CSS import remains a problem though.)
    • Cannot solve the delay problem, since we still need to load wc package AFTER DOM loaded.
    • The whole wc package can only be bundled & imported as a whole due to the limit of common js model.
    • Reference:
  2. Use other bundling tool which supports ES module bundling, like rollup.
    • Could give a try, despite rollup have some bad reviews.
  3. Use only self-managed modules, ie. manage 3rd-party libraries on our own.
    • Support ES module libraries only.
    • CSS import remains a problem.
  4. Use no dependency module, ie. re-build all wheels on our own.

@nizniz187
Copy link
Contributor Author

Conclusion of weekly meeting No. 5: choose 3. Use only self-managed modules, ie. manage 3rd-party libraries on our own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant