This reverts commit 5ea2150ae7.
This commit is contained in:
@@ -41,7 +41,7 @@ var commonRules = [
|
|||||||
{ test: /\.(woff|woff2)(\?.*)?$/,
|
{ test: /\.(woff|woff2)(\?.*)?$/,
|
||||||
loader: "url-loader?limit=100000" },
|
loader: "url-loader?limit=100000" },
|
||||||
{ test: /\.(ttf|eot)(\?.*)?$/,
|
{ test: /\.(ttf|eot)(\?.*)?$/,
|
||||||
loader: "file-loader" },
|
loader: "file-loader" }
|
||||||
]
|
]
|
||||||
|
|
||||||
module.exports = function(rules, options) {
|
module.exports = function(rules, options) {
|
||||||
|
|||||||
@@ -154,8 +154,7 @@
|
|||||||
"uglifyjs-webpack-plugin": "^1.2.5",
|
"uglifyjs-webpack-plugin": "^1.2.5",
|
||||||
"url-loader": "0.5.9",
|
"url-loader": "0.5.9",
|
||||||
"webpack": "^2.6.1",
|
"webpack": "^2.6.1",
|
||||||
"webpack-bundle-size-analyzer": "^2.5.0",
|
"webpack-bundle-size-analyzer": "^2.5.0"
|
||||||
"webpack-strip-block": "^0.2.0"
|
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"deps_check_dir": ".deps_check"
|
"deps_check_dir": ".deps_check"
|
||||||
|
|||||||
@@ -104,10 +104,6 @@ export const resolveSpec = (json, url) => ({specActions, specSelectors, errActio
|
|||||||
|
|
||||||
let specStr = specSelectors.specStr()
|
let specStr = specSelectors.specStr()
|
||||||
|
|
||||||
/* develblock:start */
|
|
||||||
require("root/src/perf").start("resolve")
|
|
||||||
/* develblock:end */
|
|
||||||
|
|
||||||
return resolve({
|
return resolve({
|
||||||
fetch,
|
fetch,
|
||||||
spec: json,
|
spec: json,
|
||||||
@@ -135,9 +131,6 @@ export const resolveSpec = (json, url) => ({specActions, specSelectors, errActio
|
|||||||
errActions.newThrownErrBatch(preparedErrors)
|
errActions.newThrownErrBatch(preparedErrors)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* develblock:start */
|
|
||||||
require("root/src/perf").stop("resolve")
|
|
||||||
/* develblock:end */
|
|
||||||
return specActions.updateResolved(spec)
|
return specActions.updateResolved(spec)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,15 +42,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
[UPDATE_RESOLVED]: (state, action) => {
|
[UPDATE_RESOLVED]: (state, action) => {
|
||||||
/* develblock:start */
|
return state.setIn(["resolved"], fromJSOrdered(action.payload))
|
||||||
require("root/src/perf").start("UPDATE_RESOLVED")
|
|
||||||
/* develblock:end */
|
|
||||||
const resolved = fromJSOrdered(action.payload)
|
|
||||||
|
|
||||||
/* develblock:start */
|
|
||||||
require("root/src/perf").stop("UPDATE_RESOLVED")
|
|
||||||
/* develblock:end */
|
|
||||||
return state.setIn(["resolved"], resolved)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
[UPDATE_RESOLVED_SUBTREE]: (state, action) => {
|
[UPDATE_RESOLVED_SUBTREE]: (state, action) => {
|
||||||
|
|||||||
@@ -15,15 +15,9 @@ const idFn = a => a
|
|||||||
function createStoreWithMiddleware(rootReducer, initialState, getSystem) {
|
function createStoreWithMiddleware(rootReducer, initialState, getSystem) {
|
||||||
|
|
||||||
let middlwares = [
|
let middlwares = [
|
||||||
/* develblock:start */
|
// createLogger( {
|
||||||
// Measure actions
|
// stateTransformer: state => state && state.toJS()
|
||||||
() => next => action => {
|
// } ),
|
||||||
require("root/src/perf").start("action:"+action.type)
|
|
||||||
const res = next(action)
|
|
||||||
require("root/src/perf").stop("action:"+action.type)
|
|
||||||
return res
|
|
||||||
},
|
|
||||||
/* develblock:end */
|
|
||||||
systemThunkMiddleware( getSystem )
|
systemThunkMiddleware( getSystem )
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
16
src/perf.js
16
src/perf.js
@@ -1,16 +0,0 @@
|
|||||||
// This uses experimental console methods, to track performance
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
start(str) {
|
|
||||||
/* develblock:start */
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.time(str)
|
|
||||||
/* develblock:end */
|
|
||||||
},
|
|
||||||
stop(str) {
|
|
||||||
/* develblock:start */
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.timeEnd(str)
|
|
||||||
/* develblock:end */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -15,17 +15,7 @@ let rules = [
|
|||||||
},
|
},
|
||||||
{ loader: "babel-loader?retainLines=true" }
|
{ loader: "babel-loader?retainLines=true" }
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
// This will strip out blocks of code that start with:
|
|
||||||
/* develblock:start */
|
|
||||||
// And end with
|
|
||||||
/* develblock:end */
|
|
||||||
{
|
|
||||||
test: /\.jsx?$/,
|
|
||||||
enforce: "pre",
|
|
||||||
exclude: /(node_modules|\.spec\.js)/,
|
|
||||||
loader: "webpack-strip-block"
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
rules = rules.concat(styleRules)
|
rules = rules.concat(styleRules)
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const rules = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
module.exports = require("./make-webpack-config")(rules, {
|
module.exports = require("./make-webpack-config")(rules, {
|
||||||
|
|||||||
@@ -5,9 +5,4 @@ config.plugins = config.plugins.filter(plugin => {
|
|||||||
return plugin.constructor.name !== "UglifyJsPlugin"
|
return plugin.constructor.name !== "UglifyJsPlugin"
|
||||||
})
|
})
|
||||||
|
|
||||||
config.module.rules = config.module.rules.filter(rule => {
|
|
||||||
// Disable minification
|
|
||||||
return rule.loader != "webpack-strip-block"
|
|
||||||
})
|
|
||||||
|
|
||||||
module.exports = config
|
module.exports = config
|
||||||
|
|||||||
Reference in New Issue
Block a user