Closed Bug 1390815 Opened 7 years ago Closed 7 years ago

Upgrade Webpack to version 3

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: Honza, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

The launchpad started using Webpack 3+ and the Console should do it too. One issue I am seeing related to the upgrade is: C:\src\mozilla.org\mozilla-central\devtools\client\webconsole\node_modules\webpac k\lib\webpack.js:19 throw new WebpackOptionsValidationError(webpackOptionsValidationErrors); ^ WebpackOptionsValidationError: Invalid configuration object. Webpack has been ini tialised using a configuration object that does not match the API schema. - configuration has an unknown property 'babelExcludes'. Webpack 2+ is stricter with custom properties for loaders. Honza
(In reply to Jan Honza Odvarko [:Honza] from comment #0) > The launchpad started using Webpack 3+ and the Console should do it too. > > One issue I am seeing related to the upgrade is: > > C:\src\mozilla.org\mozilla- > central\devtools\client\webconsole\node_modules\webpac > k\lib\webpack.js:19 > throw new WebpackOptionsValidationError(webpackOptionsValidationErrors); > ^ > > WebpackOptionsValidationError: Invalid configuration object. Webpack has > been ini > tialised using a configuration object that does not match the API schema. > - configuration has an unknown property 'babelExcludes'. > > Webpack 2+ is stricter with custom properties for loaders. > > Honza This should be fixed by https://github.com/devtools-html/devtools-core/pull/622 (and a package update).
I uploaded a WIP patch. There isn't much there, the babelExclude error will be fix by a new devtools-launchpad version. With the fix on the launchpad, I still see errors because of the way we load properties files (see [1]). Not sure why it fails now, webpack maybe changed how require.context works, but I couldn't find anything about it so far. As a side note, it looks like we do need babel so it can strips flow annotations from files that have them (in devtools-launchpad for example). [1] The error: ERROR in /Users/nchevobbe/Projects/mozilla-central/devtools/shared/l10n.js Module not found: Error: Can't resolve 'raw' in '/Users/nchevobbe/Projects/mozilla-central/devtools/shared' @ /Users/nchevobbe/Projects/mozilla-central/devtools/shared/l10n.js 29:18-30:59
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Comment on attachment 8902300 [details] Bug 1390815 - Fix console launchpad. https://reviewboard.mozilla.org/r/173820/#review179946 Thanks Nicolas for the patch! R+ Bug 1362036 includes netmonitor modules and we need to also updated list of aliases. I'll fix it as soon as patch from bug 1362036 and this patch lands in mc I've reported bug 1395515 for it. Honza ::: devtools/client/webconsole/webpack.config.js:105 (Diff revision 2) > > "devtools/shared/defer": path.join(__dirname, "../../shared/defer"), > "devtools/shared/old-event-emitter": "devtools-modules/src/utils/event-emitter", > "devtools/shared/client/main": path.join(__dirname, "new-console-output/test/fixtures/ObjectClient"), > "devtools/shared/platform/clipboard": path.join(__dirname, "../../shared/platform/content/clipboard"), > - } > + }, nit: this causes conflict with patch in bug 1362036 Perhaps we can remove it.
Attachment #8902300 - Flags: review?(odvarko) → review+
Comment on attachment 8902300 [details] Bug 1390815 - Fix console launchpad. https://reviewboard.mozilla.org/r/173820/#review179960 Looks good to me, thanks Nicolas. devtools/client/webconsole/webpack/rewrite-raw.js will probably be needed by other tools than the console as they upgrade to a new Launchpad. What should be our follow up here: bug to move it to shared in m-c or PR on devtools-launchpad to integrate the feature there?
Attachment #8902300 - Flags: review?(jdescottes) → review+
Comment on attachment 8902300 [details] Bug 1390815 - Fix console launchpad. https://reviewboard.mozilla.org/r/173820/#review180016 If Honza and Julian are OK with it, fine by me!
Attachment #8902300 - Flags: review?(bgrinstead) → review+
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/79c33fb4ac95 Fix console launchpad. r=bgrins,Honza,jdescottes
I think it might be nice to have it fixed directly in the launchpad
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: