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

Optional @finos/perspective-webpack-plugin #870

Merged
merged 3 commits into from
Jan 15, 2020
Merged

Conversation

texodus
Copy link
Member

@texodus texodus commented Jan 13, 2020

Makes @finos/perspective default to export a WASM-inlined build, which inlines the WASM payload as base64 and the WebWorker as an inline string. With this change, by default:

  • All @finos/perspective* modules will build without @finos/perspective-webpack-plugin.
  • All bundlers (including webpack) will work without special configuration.

But:

  • Bundle outputs will be ~500kb larger (due to base64 encoding overhead).
  • Initial load will be slower (though engine runtime once loaded will not be affected).
  • Debuggers which try to load the raw JS file may go haywire.

So by default, perspective will now be easier to install, but output a slightly worse build. By using @finos/perspective-webpack-plugin, the build will still work as currently, outputting the independent perspective.wasm.worker.js and psp.async.wasm, with no performance impact.

This is intended to address many recent support questions about build errors for new users e.g. #860 #857

On the side, this also makes perspective-test output screenshots from different architectures to separate folders, which makes testing across docker/local puppeteer much more convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements JS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants