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

Port to esbuild #1611

Merged
merged 17 commits into from
Nov 17, 2021
Merged

Port to esbuild #1611

merged 17 commits into from
Nov 17, 2021

Conversation

texodus
Copy link
Member

@texodus texodus commented Nov 16, 2021

Replace webpack and rollup composite build with esbuild, substantially improving the developer experience, as all JavaScript/TypeScript/CSS assets can be built in under 10 seconds, as opposed to 2-3 minutes on webpack. @finos/perspective-webpack-plugin still works and can build these assets via webpack, so this change should really only affect how perspective is built for packaging.

The main potentially-breaking change is that NPM packages have moved from "main"/"module"/"browser"/etc key menagerie to "externals", which is only supported by webpack ^5 and node 12.7.1. For webpack, while support for version ^4 was already deprecated in @finos/perspective-webpack-plugin, perspective could still be built without the plugin using the package's UMD module output (the default); this is no longer the case, though older webpack versions should still be able to link directly to the UMD filepath within the module, e.g. @finos/perspective/dist/umd/perspective.js. Note also that externals, unlike the previous package descriptors, makes other files private by default, so there is some risk of unexpected file resolution issues if a package imports something we did not expect.

@@ -5,7 +5,7 @@
"description": "An example app built using `@finos/perspective-workspace`.",
"scripts": {
"start": "webpack serve --open",
"webpack": "webpack --colour"
"webpack": "webpack --color"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🇺🇸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Internal refactoring and code quality improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants