-
Notifications
You must be signed in to change notification settings - Fork 275
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
require() triggers a warning if running in browser #880
Comments
Looks like the loader could use some tweaks to have it function better with the browser: |
I used to have something in place when I used webpack to avoid the error, but I don't know if it will work with modules. What is fs, and is there a package on jsdelivr that can be used for it? |
In what context is the fs loader being used in the browser? Wouldn't you use a different loader in that case? |
as a module. See the js console at
https://jsfiddle.net/tacman1123/azb4dmwe/7/
…On Tue, Nov 7, 2023 at 9:41 AM Will Rowe ***@***.***> wrote:
In what context is the fs loader being used in the browser? Wouldn't you
use a different loader in that case?
—
Reply to this email directly, view it on GitHub
<#880 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEXIQN3HJS5CGJVD5OEO73YDJCB3AVCNFSM6AAAAAA6MQ3LFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJYGY4DOMRUGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Interesting, so it happens just by importing without doing anything else? |
yes. But fortunately it works (beautifully). The code is wrapping in a
try / catch, but still throws the warning.
…On Tue, Nov 7, 2023 at 2:29 PM Will Rowe ***@***.***> wrote:
Interesting, so it happens just by importing without doing anything else?
—
Reply to this email directly, view it on GitHub
<#880 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEXIQOOYHAN5VPKZHBJTRDYDKD3JAVCNFSM6AAAAAA6MQ3LFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJZG42TSMBZHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
There is a warning in then console about the require function not being present when running twigjs as an imported module.
Please see symfony/symfony#52252
The code still works, but it would be nice to get rid of this warning.
The text was updated successfully, but these errors were encountered: