fast-css-split-webpack-plugin
Advanced tools
Comparing version 1.0.0 to 1.0.1
1.0.1 / 2018-04-27 | ||
================== | ||
* chore: bump to 1.0.1 | ||
* fix: fix css split | ||
1.0.0 / 2018-04-27 | ||
@@ -6,2 +12,1 @@ ================== | ||
* init | ||
'use strict' | ||
const path = require('path') | ||
const split = require('css-split') | ||
@@ -28,3 +29,3 @@ const { RawSource } = require('webpack-sources') | ||
*/ | ||
const nameInterpolator = (input) => ({file, content, index}) => { | ||
const nameInterpolator = (input) => ({ file, content, index }) => { | ||
const res = interpolateName({ | ||
@@ -55,3 +56,3 @@ context: '/', | ||
} | ||
return ({file}) => file | ||
return ({ file }) => file | ||
} | ||
@@ -107,2 +108,3 @@ return () => false | ||
} | ||
const dirname = path.dirname(key) | ||
const getName = (i) => this.options.filename(Object.assign({}, asset, { | ||
@@ -117,2 +119,3 @@ content: input.source, | ||
result.name = getName(i) | ||
result.fullname = dirname && dirname !== '.' ? `${dirname}/${result.name}` : result.name | ||
return result | ||
@@ -143,7 +146,7 @@ }) | ||
entry.chunks.forEach((file) => { | ||
assets[file.name] = file | ||
chunk.files.push(file.name) | ||
assets[file.fullname] = file | ||
chunk.files.push(file.fullname) | ||
}) | ||
const content = entry.chunks.map((file) => { | ||
return `@import "${publicPath}/${file._name}";` | ||
return `@import "${publicPath}/${file.name}";` | ||
}).join('\n') | ||
@@ -150,0 +153,0 @@ const imports = this.options.imports(Object.assign({}, entry, { |
{ | ||
"name": "fast-css-split-webpack-plugin", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "yibn2008 <yibn2008@qq.com>", | ||
@@ -5,0 +5,0 @@ "license": "CC0-1.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
21108
413