Bug 1410782 - Fix props.connector is undefined when running launchpad r=Honza

MozReview-Commit-ID: L0UbcaLfrOS

--HG--
extra : rebase_source : de350aba1587a28e363b024be0f9ce00b32755af
This commit is contained in:
Ricky Chien 2017-10-23 15:39:47 +08:00
parent 7f7ffdecd6
commit ba3ed5556d
5 changed files with 328 additions and 815 deletions

View file

@ -24,8 +24,9 @@
},
"firefox": {
"webSocketConnection": false,
"proxyHost": "localhost:9000",
"webSocketHost": "localhost:6080",
"host": "localhost",
"webSocketPort": 8116,
"tcpPort": 6080,
"mcPath": "./firefox"
},
"development": {

View file

@ -9,19 +9,18 @@
"codemirror": "^5.24.2",
"devtools-config": "=0.0.12",
"devtools-contextmenu": "=0.0.3",
"devtools-launchpad": "=0.0.96",
"devtools-modules": "=0.0.31",
"devtools-launchpad": "=0.0.103",
"devtools-modules": "=0.0.32",
"devtools-source-editor": "=0.0.3",
"immutable": "^3.8.1",
"jszip": "^3.1.3",
"react": "=15.3.2",
"react-dom": "=15.3.2",
"react": "=15.6.1",
"react-dom": "=15.6.1",
"react-redux": "=5.0.3",
"redux": "^3.6.0",
"reselect": "^2.5.4"
},
"devDependencies": {
"babel-preset-es2015": "^6.6.0",
"babel-register": "^6.24.0",
"file-loader": "^0.10.1"
},

View file

@ -23,21 +23,18 @@ let webpackConfig = {
test: /\.(png|svg)$/,
loader: "file-loader?name=[path][name].[ext]",
},
{
/*
* The version of webpack used in the launchpad seems to have trouble
* with the require("raw!${file}") that we use for the properties
* file in l10.js.
* This loader goes through the whole code and remove the "raw!" prefix
* so the raw-loader declared in devtools-launchpad config can load
* those files.
*/
test: /\.js$/,
loader: "rewrite-raw",
},
{
test: /\.js$/,
loaders: [
/**
* The version of webpack used in the launchpad seems to have trouble
* with the require("raw!${file}") that we use for the properties
* file in l10.js.
* This loader goes through the whole code and remove the "raw!" prefix
* so the raw-loader declared in devtools-launchpad config can load
* those files.
*/
"rewrite-raw",
// Replace all references to this.browserRequire() by require()
"rewrite-browser-require",
// Replace all references to loader.lazyRequire() by require()
@ -49,7 +46,7 @@ let webpackConfig = {
resolveLoader: {
modules: [
path.resolve("./node_modules"),
"node_modules",
path.resolve("../shared/webpack"),
]
},
@ -64,8 +61,9 @@ let webpackConfig = {
resolve: {
modules: [
// Make sure webpack is always looking for modules in
// `webconsole/node_modules` directory first.
path.resolve(__dirname, "node_modules"), "node_modules"
// `netmonitor/node_modules` directory first.
path.resolve(__dirname, "node_modules"),
"node_modules",
],
alias: {
"Services": "devtools-modules/src/Services",
@ -138,9 +136,22 @@ let config = toolboxConfig(webpackConfig, getConfig(), {
});
// Remove loaders from devtools-launchpad's webpack.config.js
// * For svg-inline loader:
// Netmonitor uses file loader to bundle image assets instead of svg-inline-loader
config.module.rules = config.module.rules
.filter((rule) => !["svg-inline-loader"].includes(rule.loader));
// For svg-inline loader:
// Using file loader to bundle image assets instead of svg-inline-loader
config.module.rules = config.module.rules.filter((rule) => !["svg-inline-loader"].includes(rule.loader));
// For PostCSS loader:
// Disable PostCSS loader
config.module.rules.forEach(rule => {
if (Array.isArray(rule.use)) {
rule.use.some((use, idx) => {
if (use.loader === "postcss-loader") {
rule.use = rule.use.slice(0, idx);
return true;
}
return false;
});
}
});
module.exports = config;

File diff suppressed because it is too large Load diff

View file

@ -10,5 +10,6 @@
"eslint-plugin-no-unsanitized": "2.0.1",
"eslint-plugin-react": "7.1.0",
"eslint-plugin-spidermonkey-js": "file:tools/lint/eslint/eslint-plugin-spidermonkey-js"
}
},
"devDependencies": {}
}