Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loadable/webpack-plugin

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loadable/webpack-plugin - npm Package Compare versions

Comparing version 5.14.2 to 5.15.0

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [5.15.0](https://github.com/gregberge/loadable-components/compare/v5.14.2...v5.15.0) (2021-05-08)
### Features
* support multiple Webpack runtimes ([#701](https://github.com/gregberge/loadable-components/issues/701)) ([d351367](https://github.com/gregberge/loadable-components/commit/d3513679ed680e46967ca18555116c06e5a4b341))
* webpack plugin doesn't need all chunk info ([#735](https://github.com/gregberge/loadable-components/issues/735)) ([cea9f24](https://github.com/gregberge/loadable-components/commit/cea9f249f7550a1154cf88bcfa3812ebb78a500f))
## [5.14.2](https://github.com/gregberge/loadable-components/compare/v5.14.1...v5.14.2) (2021-01-31)

@@ -8,0 +20,0 @@

43

lib/index.js
"use strict";
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -20,23 +18,25 @@

writeToDisk,
outputAsset = true
outputAsset = true,
chunkLoadingGlobal = '__LOADABLE_LOADED_CHUNKS__'
} = {}) {
_defineProperty(this, "handleEmit", compilation => {
const stats = compilation.getStats().toJson({
all: false,
assets: true,
chunks: false,
chunkGroups: true,
chunkGroupChildren: true,
hash: true,
publicPath: true,
assets: true,
chunks: true,
modules: false,
source: false,
errorDetails: false,
timings: false
ids: true,
outputPath: true,
publicPath: true
});
stats.generator = 'loadable-components'; // we don't need all chunk information, only a type
stats.chunks = stats.chunks.map(chunk => _extends({}, chunk, {
modules: [],
// in case modules array is big
origins: [] // in case origins array is big
}));
stats.chunks = [...compilation.chunks].map(chunk => {
return {
id: chunk.id,
files: [...chunk.files]
};
});
const result = JSON.stringify(stats, null, 2);

@@ -85,3 +85,4 @@

outputAsset,
path
path,
chunkLoadingGlobal
}; // The Webpack compiler instance

@@ -94,8 +95,8 @@

this.compiler = compiler;
const version = 'jsonpFunction' in compiler.options.output ? 4 : 5; // Add a custom chunk loading callback __LOADABLE_LOADED_CHUNKS__
const version = 'jsonpFunction' in compiler.options.output ? 4 : 5; // Add a custom chunk loading callback
if (version === 4) {
compiler.options.output.jsonpFunction = '__LOADABLE_LOADED_CHUNKS__';
compiler.options.output.jsonpFunction = this.opts.chunkLoadingGlobal;
} else {
compiler.options.output.chunkLoadingGlobal = '__LOADABLE_LOADED_CHUNKS__';
compiler.options.output.chunkLoadingGlobal = this.opts.chunkLoadingGlobal;
}

@@ -118,3 +119,3 @@

name,
stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_REPORT
}, () => {

@@ -121,0 +122,0 @@ const asset = this.handleEmit(compilation);

{
"name": "@loadable/webpack-plugin",
"description": "Webpack plugin for loadable (required for SSR).",
"version": "5.14.2",
"version": "5.15.0",
"main": "lib/index.js",

@@ -33,3 +33,3 @@ "repository": "git@github.com:gregberge/loadable-components.git",

},
"gitHead": "3676e488a714068baca5cefad2aa98c0de0a8fab"
"gitHead": "e74b3c9d9d1c2c54af12b5060dd381a10ac1e8ae"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc