Files
tubestation/devtools/client/inspector/webpack/rewrite-browser-require.js
Julian Descottes 3a4cf68bbf Bug 1321509 - use devtools-local-toolbox to load the inspector in content;r=bgrins,tromey
Add package.json to devtools/client/inspector
Integration with devtools-local-toolbox:
- provides development server
- default webpack config
- landing page to select a tab

In this patch:
- bin/dev-server-js contains the inspector specific routes
- webpack/*-sham.js : inspector dependencies that had to be mocked
  ideally, decoupling work should continue and the inspector client
  should only ever require files that require no chrome priviledged
  APIs.
- toolbox.js contains the interface with devtools-local-toolbox bootstrap
  and the inspector panel initialization
- configs/development.json is the inspector config for the devtools-local-toolbox

MozReview-Commit-ID: 7YQLUlgSyDX
2016-12-07 18:24:51 +01:00

13 lines
434 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Replace all occurrences of "this.browserRequire(" by "require(".
"use strict";
module.exports = function (content) {
this.cacheable && this.cacheable();
return content.replace(/this\.browserRequire\(/g, "require(");
};