Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[devtools-rfcs] Allow to use require("react") and others in browser-loader

8 views
Skip to first unread message

Julian Descottes

unread,
May 29, 2018, 5:45:19 AM5/29/18
to dev-developer-tools
A new proposal has been posted on https://github.com/devtools-html/rfcs

subject: Allow to use require("react") and others in browser-loader
link: https://github.com/devtools-html/rfcs/issues/50

> In Bug 1450071, I am trying to use fluent (new l10n API from localization
team)
> to localize the application panel. fluent-react is a library that provides
> react bindings to use fluent. It works almost as is when imported in
DevTools,
> except that we have to udpate the require() to point to the vendored
versions
> of react/react-prop-types/etc...:
>
> require('react') -> require('devtools/client/shared/vendor/react')
>
> Could we consider mapping 'react' to
'devtools/client/shared/vendor/react'
> directly in our browser-loader to facilitate reusing such libraries?
> It should also simplify the upgrading of both react and react-redux.
0 new messages