Bug 1403175 - webpack: simplify netmonitor & console aliases;r=Honza,nchevobbe
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 27 Sep 2017 10:46:33 +0200
changeset 383281 4362432d8d32a8f60fed39defcb71bb3cb7b56b5
parent 383280 317b62272ba81a824ea429f064c5c6846bafbd41
child 383282 925bee759927f9b35dab4ce7dc21073da32d7e71
push id95539
push userkwierso@gmail.com
push dateThu, 28 Sep 2017 00:01:12 +0000
treeherdermozilla-inbound@72de90e66155 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza, nchevobbe
bugs1403175
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1403175 - webpack: simplify netmonitor & console aliases;r=Honza,nchevobbe MozReview-Commit-ID: DcVNhKAgioC
devtools/client/netmonitor/webpack.config.js
devtools/client/webconsole/webpack.config.js
--- a/devtools/client/netmonitor/webpack.config.js
+++ b/devtools/client/netmonitor/webpack.config.js
@@ -68,74 +68,41 @@ let webpackConfig = {
       path.resolve(__dirname, "node_modules"), "node_modules"
     ],
     alias: {
       "Services": "devtools-modules/src/Services",
       "react": path.join(__dirname, "node_modules/react"),
 
       "devtools/client/framework/devtools": path.join(__dirname, "../../client/shims/devtools"),
       "devtools/client/framework/menu": "devtools-modules/src/menu",
-      "devtools/client/framework/menu-item": path.join(__dirname, "../../client/framework/menu-item"),
-      "devtools/client/locales": path.join(__dirname, "../../client/locales/en-US"),
       "devtools/client/netmonitor/src/utils/menu": "devtools-contextmenu",
 
-      "devtools/client/shared/components/autocomplete-popup": path.join(__dirname, "../../client/shared/components/autocomplete-popup"),
-      "devtools/client/shared/components/reps/reps": path.join(__dirname, "../../client/shared/components/reps/reps"),
-      "devtools/client/shared/components/search-box": path.join(__dirname, "../../client/shared/components/search-box"),
-      "devtools/client/shared/components/splitter/draggable": path.join(__dirname, "../../client/shared/components/splitter/draggable"),
-      "devtools/client/shared/components/splitter/split-box": path.join(__dirname, "../../client/shared/components/splitter/split-box"),
-      "devtools/client/shared/components/stack-trace": path.join(__dirname, "../../client/shared/components/stack-trace"),
-      "devtools/client/shared/components/tabs/tabbar": path.join(__dirname, "../../client/shared/components/tabs/tabbar"),
-      "devtools/client/shared/components/tabs/tabs": path.join(__dirname, "../../client/shared/components/tabs/tabs"),
-      "devtools/client/shared/components/tree/tree-view": path.join(__dirname, "../../client/shared/components/tree/tree-view"),
-      "devtools/client/shared/components/tree/tree-row": path.join(__dirname, "../../client/shared/components/tree/tree-row"),
-      "devtools/client/shared/curl": path.join(__dirname, "../../client/shared/curl"),
-      "devtools/client/shared/file-saver": path.join(__dirname, "../../client/shared/file-saver"),
-      "devtools/client/shared/keycodes": path.join(__dirname, "../../client/shared/keycodes"),
-      "devtools/client/shared/key-shortcuts": path.join(__dirname, "../../client/shared/key-shortcuts"),
-      "devtools/client/shared/prefs": path.join(__dirname, "../../client/shared/prefs"),
-      "devtools/client/shared/scroll": path.join(__dirname, "../../client/shared/scroll"),
-      "devtools/client/shared/source-utils": path.join(__dirname, "../../client/shared/source-utils"),
-      "devtools/client/shared/theme": path.join(__dirname, "../../client/shared/theme"),
-
       "devtools/client/shared/vendor/immutable": "immutable",
       "devtools/client/shared/vendor/react": "react",
       "devtools/client/shared/vendor/react-dom": "react-dom",
       "devtools/client/shared/vendor/react-redux": "react-redux",
       "devtools/client/shared/vendor/redux": "redux",
       "devtools/client/shared/vendor/reselect": "reselect",
       "devtools/client/shared/vendor/jszip": "jszip",
-      "devtools/client/shared/vendor/lodash": path.join(__dirname, "../../client/shared/vendor/lodash"),
-
-      "devtools/client/shared/widgets/tooltip/HTMLTooltip": path.join(__dirname, "../../client/shared/widgets/tooltip/HTMLTooltip"),
-      "devtools/client/shared/widgets/tooltip/ImageTooltipHelper": path.join(__dirname, "../../client/shared/widgets/tooltip/ImageTooltipHelper"),
-      "devtools/client/shared/widgets/tooltip/TooltipToggle": path.join(__dirname, "../../client/shared/widgets/tooltip/TooltipToggle"),
-      "devtools/client/shared/widgets/Chart": path.join(__dirname, "../../client/shared/widgets/Chart"),
 
       "devtools/client/sourceeditor/editor": "devtools-source-editor/src/source-editor",
-      "devtools/client/themes/variables.css": path.join(__dirname, "../../client/themes/variables.css"),
 
-      "devtools/shared/async-utils": path.join(__dirname, "../../shared/async-utils"),
-      "devtools/shared/defer": path.join(__dirname, "../../shared/defer"),
       "devtools/shared/old-event-emitter": "devtools-modules/src/utils/event-emitter",
       "devtools/shared/fronts/timeline": path.join(__dirname, "../../shared/shims/fronts/timeline"),
-      "devtools/shared/l10n": path.join(__dirname, "../../shared/l10n"),
+      "devtools/shared/platform/clipboard": path.join(__dirname, "../../shared/platform/content/clipboard"),
+
+      // Locales need to be explicitly mapped to the en-US subfolder
+      "devtools/client/locales": path.join(__dirname, "../../client/locales/en-US"),
       "devtools/shared/locales": path.join(__dirname, "../../shared/locales/en-US"),
-      "devtools/shared/platform/clipboard": path.join(__dirname, "../../shared/platform/content/clipboard"),
-      "devtools/shared/plural-form": path.join(__dirname, "../../shared/plural-form"),
-      "devtools/shared/css/color": path.join(__dirname, "../../shared/css/color"),
-      "devtools/shared/css/color-db": path.join(__dirname, "../../shared/css/color-db"),
-      "devtools/shared/css/lexer": path.join(__dirname, "../../shared/css/lexer"),
-      "devtools/shared/css/parsing-utils": path.join(__dirname, "../../shared/css/parsing-utils"),
-      "devtools/shared/css/properties-db": path.join(__dirname, "../../shared/css/properties-db"),
-      "devtools/shared/css/generated/properties-db": path.join(__dirname, "../../shared/css/generated/properties-db"),
-      "devtools/shared/task": path.join(__dirname, "../../shared/task"),
-
       "devtools/shim/locales": path.join(__dirname, "../../shared/locales/en-US"),
       "toolkit/locales": path.join(__dirname, "../../../toolkit/locales/en-US"),
+
+      // Unless a path explicitly needs to be rewritten or shimmed, all devtools paths can
+      // be mapped to ../../
+      "devtools": path.join(__dirname, "../../"),
     },
   },
 };
 
 const mappings = [
   [
     /chrome:\/\/devtools\/skin/,
     (result) => {
--- a/devtools/client/webconsole/webpack.config.js
+++ b/devtools/client/webconsole/webpack.config.js
@@ -66,73 +66,47 @@ webpackConfig.resolve = {
     // `webconsole/node_modules` directory first.
     path.resolve(__dirname, "node_modules"), "node_modules"
   ],
   alias: {
     "Services": "devtools-modules/src/Services",
 
     "devtools/client/webconsole/jsterm": path.join(projectPath, "jsterm-stub"),
     "devtools/client/webconsole/utils": path.join(__dirname, "new-console-output/test/fixtures/WebConsoleUtils"),
-    "devtools/client/webconsole/new-console-output": path.join(__dirname, "new-console-output"),
-    "devtools/client/webconsole/webconsole-connection-proxy": path.join(__dirname, "webconsole-connection-proxy"),
-    "devtools/client/webconsole/webconsole-l10n": path.join(__dirname, "webconsole-l10n"),
 
     "devtools/client/shared/vendor/immutable": "immutable",
     "devtools/client/shared/vendor/react": "react",
     "devtools/client/shared/vendor/react-dom": "react-dom",
     "devtools/client/shared/vendor/react-redux": "react-redux",
     "devtools/client/shared/vendor/redux": "redux",
     "devtools/client/shared/vendor/reselect": "reselect",
 
-    "devtools/client/locales": path.join(__dirname, "../../client/locales/en-US"),
-    "toolkit/locales": path.join(__dirname, "../../../toolkit/locales/en-US"),
-    "devtools/shared/locales": path.join(__dirname, "../../shared/locales/en-US"),
-    "devtools/shim/locales": path.join(__dirname, "../../shared/locales/en-US"),
-    "devtools/shared/plural-form": path.join(__dirname, "../../shared/plural-form"),
-    "devtools/shared/l10n": path.join(__dirname, "../../shared/l10n"),
     "devtools/shared/system": path.join(projectPath, "system-stub"),
 
     "devtools/client/framework/devtools": path.join(__dirname, "../../client/shims/devtools"),
     "devtools/client/framework/menu": "devtools-modules/src/menu",
-    "devtools/client/framework/menu-item": path.join(__dirname, "../../client/framework/menu-item"),
     "devtools/client/sourceeditor/editor": "devtools-source-editor/src/source-editor",
 
-    "devtools/client/shared/redux/middleware/thunk": path.join(__dirname, "../../client/shared/redux/middleware/thunk"),
-    "devtools/client/shared/redux/middleware/debounce": path.join(__dirname, "../../client/shared/redux/middleware/debounce"),
-
-    "devtools/client/shared/components/reps/reps": path.join(__dirname, "../../client/shared/components/reps/reps"),
-    "devtools/client/shared/components/stack-trace": path.join(__dirname, "../../client/shared/components/stack-trace"),
-    "devtools/client/shared/components/search-box": path.join(__dirname, "../../client/shared/components/search-box"),
-    "devtools/client/shared/components/splitter/draggable": path.join(__dirname, "../../client/shared/components/splitter/draggable"),
-    "devtools/client/shared/components/splitter/split-box": path.join(__dirname, "../../client/shared/components/splitter/split-box"),
-    "devtools/client/shared/components/frame": path.join(__dirname, "../../client/shared/components/frame"),
-    "devtools/client/shared/components/autocomplete-popup": path.join(__dirname, "../../client/shared/components/autocomplete-popup"),
-    "devtools/client/shared/components/tabs/tabbar": path.join(__dirname, "../../client/shared/components/tabs/tabbar"),
-    "devtools/client/shared/components/tabs/tabs": path.join(__dirname, "../../client/shared/components/tabs/tabs"),
-    "devtools/client/shared/components/tree/tree-view": path.join(__dirname, "../../client/shared/components/tree/tree-view"),
-    "devtools/client/shared/components/tree/tree-row": path.join(__dirname, "../../client/shared/components/tree/tree-row"),
-
-    "devtools/client/shared/source-utils": path.join(__dirname, "../../client/shared/source-utils"),
-    "devtools/client/shared/key-shortcuts": path.join(__dirname, "../../client/shared/key-shortcuts"),
-    "devtools/client/shared/keycodes": path.join(__dirname, "../../client/shared/keycodes"),
     "devtools/client/shared/zoom-keys": "devtools-modules/src/zoom-keys",
-    "devtools/client/shared/curl": path.join(__dirname, "../../client/shared/curl"),
-    "devtools/client/shared/scroll": path.join(__dirname, "../../client/shared/scroll"),
 
     "devtools/shared/fronts/timeline": path.join(__dirname, "../../shared/shims/fronts/timeline"),
-    "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"),
     "devtools/shared/platform/stack": path.join(__dirname, "../../shared/platform/content/stack"),
 
-    "devtools/client/netmonitor/src/utils/request-utils": path.join(__dirname, "../netmonitor/src/utils/request-utils"),
-    "devtools/client/netmonitor/src/components/tabbox-panel": path.join(__dirname, "../netmonitor/src/components/tabbox-panel"),
-    "devtools/client/netmonitor/src/connector/firefox-data-provider": path.join(__dirname, "../netmonitor/src/connector/firefox-data-provider"),
-    "devtools/client/netmonitor/src/constants": path.join(__dirname, "../netmonitor/src/constants"),
+    // Locales need to be explicitly mapped to the en-US subfolder
+    "toolkit/locales": path.join(__dirname, "../../../toolkit/locales/en-US"),
+    "devtools/client/locales": path.join(__dirname, "../../client/locales/en-US"),
+    "devtools/shared/locales": path.join(__dirname, "../../shared/locales/en-US"),
+    "devtools/shim/locales": path.join(__dirname, "../../shared/locales/en-US"),
+
+    // Unless a path explicitly needs to be rewritten or shimmed, all devtools paths can
+    // be mapped to ../../
+    "devtools": path.join(__dirname, "../../"),
   }
 };
 
 const mappings = [
   [
     /utils\/menu/, "devtools-launchpad/src/components/shared/menu"
   ],
   [