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 3 commits into from Jan 15, 2020


Copy link

@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.


  • 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.

sc1f approved these changes Jan 13, 2020
@texodus texodus force-pushed the optional-webpack-plugin branch from 34e76ad to 72e9b20 Compare Jan 14, 2020
@texodus texodus merged commit 860534f into master Jan 15, 2020
6 checks passed
@texodus texodus deleted the optional-webpack-plugin branch Jan 15, 2020
@texodus texodus added enhancement JS labels Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
cla-present enhancement JS
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants