react-loadable-ssr-addon
Advanced tools
Comparing version 0.2.0 to 0.2.1
react-loadable-ssr-addon is authored by: | ||
* Alexey Pyltsyn <lex61rus@gmail.com> | ||
* Endi <endiliey@gmail.com> | ||
@@ -4,0 +5,0 @@ * Jérémie Parker <gitkraken@jeremie-parker.com> |
@@ -37,3 +37,3 @@ "use strict"; | ||
this.options = _extends({}, defaultOptions, {}, options); | ||
this.options = _extends({}, defaultOptions, options); | ||
this.compiler = null; | ||
@@ -133,3 +133,3 @@ this.stats = null; | ||
return compilationChunks.map(function (chunk) { | ||
return compilationChunks.reduce(function (chunks, chunk) { | ||
var siblings = new Set(); | ||
@@ -150,11 +150,14 @@ | ||
return { | ||
id: chunk.id, | ||
names: chunk.name ? [chunk.name] : [], | ||
files: chunk.files.slice(), | ||
hash: chunk.renderedHash, | ||
siblings: Array.from(siblings).sort(compareId), | ||
modules: chunk.getModules() | ||
}; | ||
}); | ||
chunk.ids.forEach(function (id) { | ||
chunks.push({ | ||
id: id, | ||
names: chunk.name ? [chunk.name] : [], | ||
files: chunk.files.slice(), | ||
hash: chunk.renderedHash, | ||
siblings: Array.from(siblings).sort(compareId), | ||
modules: chunk.getModules() | ||
}); | ||
}); | ||
return chunks; | ||
}, []); | ||
}; | ||
@@ -161,0 +164,0 @@ |
@@ -17,3 +17,3 @@ "use strict"; | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
@@ -20,0 +20,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } |
{ | ||
"name": "react-loadable-ssr-addon", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Server Side Render add-on for React Loadable. Load splitted chunks was never that easy.", | ||
@@ -35,3 +35,3 @@ "main": "lib/index.js", | ||
"lint:fix": "eslint --ext js --ext jsx source --fix|| exit 0", | ||
"test": "npm run clean:example && npm run build && webpack && ava && npm run clean:example", | ||
"test": "npm run clean:example && npm run build && webpack && ava; npm run clean:example", | ||
"stats": "NODE_ENV=development webpack --profile --json > compilation-stats.json" | ||
@@ -42,2 +42,6 @@ }, | ||
}, | ||
"resolutions": { | ||
"yargs-parser": "13.1.2", | ||
"mem": "4.0.0" | ||
}, | ||
"peerDependencies": { | ||
@@ -48,27 +52,27 @@ "react-loadable": "*", | ||
"devDependencies": { | ||
"@babel/cli": "^7.6.4", | ||
"@babel/core": "^7.6.4", | ||
"@babel/node": "^7.6.3", | ||
"@babel/plugin-proposal-class-properties": "^7.5.5", | ||
"@babel/plugin-syntax-dynamic-import": "^7.2.0", | ||
"@babel/plugin-transform-classes": "^7.5.5", | ||
"@babel/plugin-transform-object-assign": "^7.2.0", | ||
"@babel/preset-env": "^7.6.3", | ||
"@babel/preset-react": "^7.6.3", | ||
"@babel/register": "^7.6.2", | ||
"@babel/cli": "^7.10.1", | ||
"@babel/core": "^7.10.1", | ||
"@babel/node": "^7.10.1", | ||
"@babel/plugin-proposal-class-properties": "^7.10.1", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/plugin-transform-classes": "^7.10.1", | ||
"@babel/plugin-transform-object-assign": "^7.10.1", | ||
"@babel/preset-env": "^7.10.1", | ||
"@babel/preset-react": "^7.10.1", | ||
"@babel/register": "^7.10.1", | ||
"ava": "^2.4.0", | ||
"babel-loader": "^8.0.6", | ||
"babel-plugin-dynamic-import-node": "^2.3.0", | ||
"babel-plugin-module-resolver": "^3.2.0", | ||
"babel-loader": "^8.1.0", | ||
"babel-plugin-dynamic-import-node": "^2.3.3", | ||
"babel-plugin-module-resolver": "^4.0.0", | ||
"babel-plugin-transform-remove-console": "^6.9.4", | ||
"babel-preset-minify": "^0.5.1", | ||
"eslint": "^6.5.1", | ||
"eslint-config-airbnb": "18.0.1", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint": "^7.1.0", | ||
"eslint-config-airbnb": "18.1.0", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-react": "^7.16.0", | ||
"eslint-plugin-react": "^7.20.0", | ||
"express": "^4.17.1", | ||
"husky": "^3.0.9", | ||
"react": "^16.10.2", | ||
"react-dom": "^16.10.2", | ||
"husky": "^4.2.5", | ||
"react": "^16.13.1", | ||
"react-dom": "^16.13.1", | ||
"react-loadable": "^5.5.0", | ||
@@ -75,0 +79,0 @@ "webpack": "3.6.0" |
@@ -340,2 +340,4 @@ # React Loadable SSR Add-on | ||
## Release History | ||
* 0.2.1 | ||
* FIX: [Possible missing chunk](https://github.com/themgoncalves/react-loadable-ssr-addon/pull/20) reported by [@lex111](https://github.com/lex111) | ||
* 0.2.0 | ||
@@ -342,0 +344,0 @@ * Improvement: Reduce memory consumption ([Issue #17](https://github.com/themgoncalves/react-loadable-ssr-addon/issues/17)) reported by [@endiliey](https://github.com/endiliey) |
/** | ||
* react-loadable-ssr-addon | ||
* @author Marcos Gonçalves <contact@themgoncalves.com> | ||
* @version 0.2.0 | ||
* @version 0.2.1 | ||
*/ | ||
@@ -6,0 +6,0 @@ |
@@ -5,3 +5,3 @@ import test from 'ava'; | ||
import config from '../webpack.config'; | ||
import manifest from '../example/dist/react-loadable-ssr-addon'; // eslint-disable-line import/no-unresolved | ||
import manifest from '../example/dist/react-loadable-ssr-addon'; // eslint-disable-line import/no-unresolved, import/extensions | ||
@@ -8,0 +8,0 @@ const modules = ['./Header', './multilevel/Multilevel', './SharedMultilevel', '../../SharedMultilevel']; |
/** | ||
* react-loadable-ssr-addon | ||
* @author Marcos Gonçalves <contact@themgoncalves.com> | ||
* @version 0.2.0 | ||
* @version 0.2.1 | ||
*/ | ||
@@ -6,0 +6,0 @@ |
/** | ||
* react-loadable-ssr-addon | ||
* @author Marcos Gonçalves <contact@themgoncalves.com> | ||
* @version 0.2.0 | ||
* @version 0.2.1 | ||
*/ | ||
@@ -195,3 +195,3 @@ | ||
return compilationChunks.map((chunk) => { | ||
return compilationChunks.reduce((chunks, chunk) => { | ||
const siblings = new Set(); | ||
@@ -212,11 +212,15 @@ | ||
return { | ||
id: chunk.id, | ||
names: chunk.name ? [chunk.name] : [], | ||
files: chunk.files.slice(), | ||
hash: chunk.renderedHash, | ||
siblings: Array.from(siblings).sort(compareId), | ||
modules: chunk.getModules(), | ||
}; | ||
}); | ||
chunk.ids.forEach((id) => { | ||
chunks.push({ | ||
id, | ||
names: chunk.name ? [chunk.name] : [], | ||
files: chunk.files.slice(), | ||
hash: chunk.renderedHash, | ||
siblings: Array.from(siblings).sort(compareId), | ||
modules: chunk.getModules(), | ||
}); | ||
}); | ||
return chunks; | ||
}, []); | ||
} | ||
@@ -223,0 +227,0 @@ |
/** | ||
* react-loadable-ssr-addon | ||
* @author Marcos Gonçalves <contact@themgoncalves.com> | ||
* @version 0.2.0 | ||
* @version 0.2.1 | ||
*/ | ||
@@ -6,0 +6,0 @@ |
/** | ||
* react-loadable-ssr-addon | ||
* @author Marcos Gonçalves <contact@themgoncalves.com> | ||
* @version 0.2.0 | ||
* @version 0.2.1 | ||
*/ | ||
@@ -6,0 +6,0 @@ |
/** | ||
* react-loadable-ssr-addon | ||
* @author Marcos Gonçalves <contact@themgoncalves.com> | ||
* @version 0.2.0 | ||
* @version 0.2.1 | ||
*/ | ||
@@ -6,0 +6,0 @@ |
/** | ||
* react-loadable-ssr-addon | ||
* @author Marcos Gonçalves <contact@themgoncalves.com> | ||
* @version 0.2.0 | ||
* @version 0.2.1 | ||
*/ | ||
@@ -6,0 +6,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
379151
47
1344
430