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?
to your account
Want to set the browser field to either the dist/handlebars file or lib/handlebars to avoid issues with require.extension code being included on the client.
Should look at using browser as an object rather than a string:
This might let us handle the runtime and the full library.
The text was updated successfully, but these errors were encountered:
This would be incredibly useful for circumstances where we don't have access to a webpack.config.
For example, import * as Handlebars from 'handlebars'; within an angular project causes the fs not found issue because it is importing the wrong build. It should be pointing to dist/handlebars.min.js.
import * as Handlebars from 'handlebars';
Using import * as Handlebars from 'handlebars/dist/handlebars'; causes typedef errors.
import * as Handlebars from 'handlebars/dist/handlebars';
Sorry, something went wrong.
I'm open for trying this. Could you open a PR to the 4.x branch?
The difficult part is determining whether this has any breaking side-effects for other users. Any ideas?
I've opened a PR to add browser to the package.json #1540. It's hard to write a test for this kind of change I know it resolves issues in my use case but welcome ideas on how to more reliably test it.
Merge pull request #1540 from ouijan/browser-resolution
added browser to package.json, resolves #1102
Successfully merging a pull request may close this issue.