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

Provide browser-ready version of @sigmacomputing/plugin #1

Open
Pearce-Ropion opened this issue Oct 20, 2022 · 0 comments
Open

Provide browser-ready version of @sigmacomputing/plugin #1

Pearce-Ropion opened this issue Oct 20, 2022 · 0 comments

Comments

@Pearce-Ropion
Copy link
Collaborator

Attach the plugin client to the window object so that it can be used via a CDN instead of through the node/react pipeline.
Some like the following API

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@sigmacomputing/plugin/dist/client.browser.js"></script>
<script type="text/javascript">
client.config.configureEditorPanel([
  { name: "source", type: "element" },
  ...

Some users have reported going through a build system like rollup to enable this:

export default {
  input: 'dist/client.js',
  output: {
    name: 'client',
    file: 'dist/client.browser.js',
    format: 'iife',
  }
};

See SIG-17489

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

No branches or pull requests

1 participant