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

Standalone browser versions of all libraries #415

Open
sstone1 opened this issue Apr 11, 2022 · 5 comments
Open

Standalone browser versions of all libraries #415

sstone1 opened this issue Apr 11, 2022 · 5 comments
Labels
Difficulty: Starter Good First Issue :octocat: Good for newcomers Type: Enhancement ✨ Improvement to process or efficiency

Comments

@sstone1
Copy link
Contributor

sstone1 commented Apr 11, 2022

Currently, several modules have UMD versions generated using Webpack:

"prepublishOnly": "webpack --config webpack.config.js --mode production",

"prepublishOnly": "webpack --config webpack.config.js --mode production",

Only concerto-core has the browser key set though.

However, in order to get this library integrated into a React application, I had to add the following polyfills and globals:

const webpack = require('webpack');

module.exports = function override(config) {
  const fallback = config.resolve.fallback || {};
  Object.assign(fallback, {
    path: require.resolve('path-browserify'),
    fs: require.resolve('browserify-fs'),
    url: require.resolve('url/'),
    util: require.resolve('util/'),
    os: require.resolve('os-browserify'),
    stream: require.resolve('stream-browserify'),
    buffer: require.resolve('buffer/'),
    // crypto: require.resolve('crypto-browserify'),
    process: require.resolve('process/browser'),
  });
  config.resolve.fallback = fallback;
  const plugins = config.plugins || [];
  plugins.push(
    new webpack.ProvidePlugin({
      Buffer: ['buffer', 'Buffer'],
      process: ['process'],
    })
  );
  config.plugins = plugins;
  return config;
};

This may be as simple as ensuring that all of our modules include UMD generated versions, rather than anything wrong with the Webpack configuration.

@mttrbrts mttrbrts added Difficulty: Starter Good First Issue :octocat: Good for newcomers Type: Enhancement ✨ Improvement to process or efficiency labels Apr 11, 2022
@utkarsh-shrivastav77
Copy link

Hi, is this issue still open

@alaykabir
Copy link

Hi, Can I work on this issue? I have decent experience in this tech-stack. So, Please can you assign it to me?

@vivek-anand-singh
Copy link

I would like to request yout to assign this issue to me related to integrating the concerto library modules into a React application.

Issue Summary:
Several concerto modules (such as concerto-core and concerto-tools) require UMD versions generated using Webpack for browser compatibility. Currently, only concerto-core has the browser key set. To integrate these modules into a React application, additional polyfills and global variables are necessary due to missing Node.js core modules in the browser environment.

My Solution:
To resolve this issue, I plan to:

  1. Ensure that all concerto modules include UMD-generated versions.
  2. Modify the Webpack configuration to add necessary polyfills and globals for Node.js core modules.

I am confident that this approach will ensure seamless integration of the concerto modules into the React application. Please let me know if you need any additional information or have any concerns regarding this request.

@VivekShahare04 VivekShahare04 mentioned this issue Dec 5, 2024
5 tasks
@VivekShahare04
Copy link

#964 (comment)
@sstone1

@debx4
Copy link

debx4 commented Dec 12, 2024

Hi , I would love to work on this issue if you let me . as I have about prerequisite knowledge about libraries and javascript that
can help to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Starter Good First Issue :octocat: Good for newcomers Type: Enhancement ✨ Improvement to process or efficiency
Projects
None yet
Development

No branches or pull requests

7 participants