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

Support for Webpack #15

Open
aaron-lang-auroramj opened this issue Oct 8, 2020 · 4 comments
Open

Support for Webpack #15

aaron-lang-auroramj opened this issue Oct 8, 2020 · 4 comments

Comments

@aaron-lang-auroramj
Copy link

Does this SDK support being bundled with webpack?

Several lines like

config.HELPER_PATH = path.join(__dirname, 'helper.js');
var helper = require(config.HELPER_PATH);

generate errors: Critical dependency: the request of a dependency is an expression

Is there a workaround?

Would you accept a PR fixing this?

@karmanya007
Copy link

For js files in asset folder, right?

@aaron-lang-auroramj
Copy link
Author

Not sure I understand your question.

I have a project that requires this SDK. When I build that with webpack, webpack traverses the dependency tree and bundles all required modules into a single file.

Because of the way this SDK uses require webpack is not able to determine at build time which modules are being required and cannot include them.

Changing this line and others to something more like require('./helper.js') would allow webpack to determine which modules are being required at build time.

@indrasen715
Copy link
Collaborator

Hi @aaron-lang-auroramj ,

Thanks for bringing this to our notice and we appreciate your valuable feedback on this.
I will review this feedback with the team, and keep you posted on the progress.

Regards
Indrasen

@dbrenot-pelmorex
Copy link

The PR i'm working on should address this issue: #25

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

4 participants