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

fast-css-split-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-css-split-webpack-plugin - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

6

HISTORY.md
1.0.4 / 2018-05-08
==================
* feat: support webpack 4
* chore: bump to 1.0.4
1.0.3 / 2018-04-27

@@ -3,0 +9,0 @@ ==================

48

lib/index.js

@@ -198,17 +198,39 @@ 'use strict'

apply (compiler) {
if (this.options.defer) {
// Run on `emit` when user specifies the compiler phase
// Due to the incorrect css split + optimization behavior
// Expected: css split should happen after optimization
compiler.plugin('emit', (compilation, done) => {
return this.chunksMapping(compilation, compilation.chunks, done)
})
// for webpack 4
if (compiler.hooks) {
const plugin = {
name: 'FastCssSplitPlugin'
}
if (this.options.defer) {
// Run on `emit` when user specifies the compiler phase
// Due to the incorrect css split + optimization behavior
// Expected: css split should happen after optimization
compiler.hooks.emit.tapAsync(plugin, (compilation, done) => {
this.chunksMapping(compilation, compilation.chunks, done)
})
} else {
// use compilation instead of this-compilation, just like other plugins do
compiler.hooks.compilation.tap(plugin, compilation => {
compilation.hooks.optimizeChunkAssets.tapAsync(plugin, (chunks, done) => {
this.chunksMapping(compilation, chunks, done)
})
})
}
} else {
// Only run on `this-compilation` to avoid injecting the plugin into
// sub-compilers as happens when using the `extract-text-webpack-plugin`.
compiler.plugin('this-compilation', (compilation) => {
compilation.plugin('optimize-chunk-assets', (chunks, done) => {
return this.chunksMapping(compilation, chunks, done)
if (this.options.defer) {
// Run on `emit` when user specifies the compiler phase
// Due to the incorrect css split + optimization behavior
// Expected: css split should happen after optimization
compiler.plugin('emit', (compilation, done) => {
return this.chunksMapping(compilation, compilation.chunks, done)
})
})
} else {
// use compilation instead of this-compilation, just like other plugins do
compiler.plugin('compilation', (compilation) => {
compilation.plugin('optimize-chunk-assets', (chunks, done) => {
return this.chunksMapping(compilation, chunks, done)
})
})
}
}

@@ -215,0 +237,0 @@ }

{
"name": "fast-css-split-webpack-plugin",
"version": "1.0.3",
"version": "1.0.4",
"author": "yibn2008 <yibn2008@qq.com>",

@@ -5,0 +5,0 @@ "license": "CC0-1.0",

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