diff --git a/.editorconfig b/.editorconfig
index 4d3466a5..9f89f364 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,17 +1,13 @@
-# EditorConfig is awesome: http://EditorConfig.org
+# editorconfig.org
-# top-most EditorConfig file
-root = true
-
-# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
+indent_style = space
+indent_size = 2
end_of_line = lf
insert_final_newline = true
-indent_style = tab
-indent_size = 4
+trim_trailing_whitespace = true
-# Matches the exact files either package.json or .travis.yml
-[{package.json,.travis.yml}]
-indent_style = space
-indent_size = 2
+[*.md]
+insert_final_newline = true
+trim_trailing_whitespace = false
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 00000000..8477d2ab
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,6 @@
+/coverage
+/dist
+/node_modules
+/test/fixtures
+/test/cases/*/expected
+/test/js
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index 49060abb..00000000
--- a/.eslintrc
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "env": {
- "node": true,
- "es6": true,
- },
- "rules": {
- "strict": 0,
- "curly": 0,
- "quotes": 0,
- "no-shadow": 0,
- "no-underscore-dangle": 0
- }
-}
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 00000000..c897f8ee
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,5 @@
+module.exports = {
+ root: true,
+ parser: 'babel-eslint',
+ extends: ['@webpack-contrib/eslint-config-webpack', 'prettier'],
+};
diff --git a/.gitattributes b/.gitattributes
index 176a458f..c76f8a99 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,5 @@
+package-lock.json -diff
* text=auto
+test/cases/* eol=lf
+bin/* eol=lf
+yarn.lock -diff
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 00000000..57da4905
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,2 @@
+# extract-css-chunks-webpack-plugin maintainers
+* @ScriptedAlchemy
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index f0c0b39c..00000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,4 +0,0 @@
-1. [Read and sign the CLA](https://cla.js.foundation/webpack/webpack.js.org). This needs to be done only once. PRs that haven't signed it won't be accepted.
-2. Check out the [development guide](https://webpack.js.org/development/) for the API and development guidelines.
-3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort.
-4. Remove these instructions from your PR as they are for your eyes only.
diff --git a/.gitignore b/.gitignore
index e8c5dd92..bc4f57a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,18 @@
-/node_modules
-
-/example/assets
-
-/test/js
+logs
+*.log
+npm-debug.log*
+.eslintcache
/coverage
-
-/.idea
-
+/dist
+/test/js
+/local
+/reports
+/node_modules
.DS_Store
-npm-debug.log
+Thumbs.db
+.idea
+.vscode
+*.sublime-project
+*.sublime-workspace
+.idea
+*.iml
diff --git a/.npmignore b/.npmignore
index 61a3bec4..3ef3ec08 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,3 +1,6 @@
example/
test/
.gitattributes
+.git
+.github
+coverage/
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..41ff7724
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,7 @@
+/coverage
+/dist
+/node_modules
+/test/fixtures
+/test/cases/*/expected
+/test/js
+CHANGELOG.md
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..e537c8ad
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,5 @@
+{
+ "singleQuote": true,
+ "trailingComma": "es5",
+ "arrowParens": "always"
+}
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 00000000..1934550a
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,5 @@
+module.exports = {
+ singleQuote: true,
+ trailingComma: 'es5',
+ arrowParens: 'always',
+};
diff --git a/.snyk b/.snyk
new file mode 100644
index 00000000..5c89b3d5
--- /dev/null
+++ b/.snyk
@@ -0,0 +1,12 @@
+# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
+version: v1.13.5
+ignore: {}
+# patches apply the minimum changes required to fix a vulnerability
+patch:
+ SNYK-JS-LODASH-450202:
+ - webpack-external-import > babel-traverse > lodash:
+ patched: '2019-07-04T06:20:01.150Z'
+ - webpack-external-import > @babel/helper-module-imports > @babel/types > lodash:
+ patched: '2019-07-04T06:20:01.150Z'
+ - webpack-external-import > babel-traverse > babel-types > lodash:
+ patched: '2019-07-04T06:20:01.150Z'
diff --git a/.travis.yml b/.travis.yml
index 1a8fb8d2..2969668d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,15 @@
sudo: false
language: node_js
node_js:
- - stable
+ - v10
+before_script:
+ - nvm use v8
+ - yarn --ignore-engines
script:
- - echo success
+ - yarn lint
+ - yarn test
after_success:
- - yarn run semantic-release
+ - npm run semantic-release
branches:
except:
- /^v\d+\.\d+\.\d+$/
@@ -14,6 +18,6 @@ notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/5156be73e058008e1ed2
- on_success: always # options: [always|never|change] default: always
- on_failure: always # options: [always|never|change] default: always
- on_start: never # options: [always|never|change] default: always
+ on_success: always # options: [always|never|change] default: always
+ on_failure: always # options: [always|never|change] default: always
+ on_start: never # options: [always|never|change] default: always
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f0064cc0..1baef1c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,59 +1,151 @@
-# Change Log
+# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-
-# [2.1.0](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0...v2.1.0) (2017-03-05)
+## [4.9.0](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/compare/v4.8.0...v4.9.0) (2020-12-07)
+
+
+### Features
+
+* adding federated stats ([#303](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/issues/303)) ([c17d755](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/commit/c17d75547a5efb5971d03555163ea4d685080706))
+* adding federated stats ([#304](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/issues/304)) ([1eab2d0](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/commit/1eab2d0b8868837de8f89f68c1ad14be741f3e78))
+
+
+### Bug Fixes
+
+* Check if bestMatch exists before pop() ([#294](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/issues/294)) ([ef82da9](https://github.com/faceyspacey/extract-css-chunks-webpack-plugin/commit/ef82da9068bd699344774d39f61b7ead8cf682cb))
+
+### [0.9.0](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.8.2...v0.9.0) (2019-12-20)
+
### Features
-* The plugin **filename** accepts a function now. [c9a19ad](https://github.com/webpack-contrib/extract-text-webpack-plugin/commit/c9a19ad), closes [#423](https://github.com/webpack-contrib/extract-text-webpack-plugin/pull/423)
+* new `esModule` option ([#475](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/475)) ([596e47a](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/596e47a8aead53f9cc0e2b1e09a2c20e455e45c1))
+
+### [0.8.2](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.8.1...v0.8.2) (2019-12-17)
-
-# [2.0.0](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-rc.3...v2.0.0) (2017-02-24)
-
-# [2.0.0-rc.2](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2017-01-28)
+### Bug Fixes
+
+* context for dependencies ([#474](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/474)) ([0269860](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/0269860adb0eaad477901188eea66693fedf7769))
+
+### [0.8.1](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.8.0...v0.8.1) (2019-12-17)
### Bug Fixes
-* **schema:** allow `extract` to accept omit/remove flags ([8ce93d5](https://github.com/webpack/extract-text-webpack-plugin/commit/8ce93d5)), closes [#371](https://github.com/webpack/extract-text-webpack-plugin/issues/371)
-* **schema:** connect loader schema with the code properly ([03bb4aa](https://github.com/webpack/extract-text-webpack-plugin/commit/03bb4aa))
-* **schema:** emit proper error messages ([70cbd4b](https://github.com/webpack/extract-text-webpack-plugin/commit/70cbd4b))
+* use filename mutated after instantiation ([#430](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/430)) ([0bacfac](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/0bacfac7ef4a06b4810fbc140875f7a038caa5bc))
+* improve warning of conflict order ([#465](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/465)) ([357d073](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/357d073bf0259f2c44e613ad4dfcbcc8354e4be3))
+* support ES module syntax ([#472](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/472)) ([2f72e1a](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/2f72e1aa267de23f121441714e88406f579e77b2))
+
+## [0.8.0](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.7.0...v0.8.0) (2019-07-16)
### Features
-* **errors:** show nicer errors if there are extra fields ([76a171d](https://github.com/webpack/extract-text-webpack-plugin/commit/76a171d))
+* Add ignoreOrder option ([#422](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/422)) ([4ad3373](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/4ad3373))
-
-# [2.0.0-rc.1](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2017-01-28)
+## [0.7.0](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.6.0...v0.7.0) (2019-05-27)
### Bug Fixes
-* **options:** pass proper loader options to children ([#266](https://github.com/webpack/extract-text-webpack-plugin/issues/266)) ([6abf42d](https://github.com/webpack/extract-text-webpack-plugin/commit/6abf42d))
+* do not attempt to reload unrequestable urls ([#378](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/378)) ([44d00ea](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/44d00ea))
+* fix `publicPath` regression ([#384](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/384)) ([582ebfe](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/582ebfe))
+* enable using plugin without defining options ([#393](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/393)) ([a7dee8c](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/a7dee8c))
+* downgrading normalize-url ([#399](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/399)) ([0dafaf6](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/0dafaf6))
+* hmr do not crash on link without href ([#400](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/400)) ([aa9b541](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/aa9b541))
+* hmr reload with invalid link url ([#402](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/402)) ([30a19b0](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/30a19b0))
+### Features
-
-# [2.0.0-rc.0](https://github.com/webpack/extract-text-webpack-plugin/compare/v2.0.0-beta.5...v2.0.0-rc.0) (2017-01-26)
+* add `moduleFilename` option ([#381](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/381)) ([13e9cbf](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/13e9cbf))
-### Bug Fixes
-* **readme:** Incorrect loader configuration ([e477cc7](https://github.com/webpack/extract-text-webpack-plugin/commit/e477cc7))
+
+# [0.6.0](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.5.0...v0.6.0) (2019-04-10)
### Features
-* **extract:** return an array of loader objects ([#343](https://github.com/webpack/extract-text-webpack-plugin/issues/343)) ([74b86e0](https://github.com/webpack/extract-text-webpack-plugin/commit/74b86e0))
+* added error code to chunk load Error ([#347](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/347)) ([b653641](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/b653641))
+* adding hot module reloading ([#334](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/334)) ([4ed9c5a](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/4ed9c5a))
+* publicPath can be a function ([#373](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/373)) ([7b1425a](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/7b1425a))
+
+
+
+
+# [0.5.0](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.4.5...v0.5.0) (2018-12-07)
+
+
+### Features
+
+* add crossOriginLoading option support ([#313](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/313)) ([ffb0d87](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/ffb0d87))
+
+
+
+
+## [0.4.5](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.4.4...v0.4.5) (2018-11-21)
+
+
+### Bug Fixes
+
+* **index:** allow requesting failed async css files ([#292](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/292)) ([2eb0af5](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/2eb0af5))
+
+
+
+
+## [0.4.4](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.4.3...v0.4.4) (2018-10-10)
+
+
+### Bug Fixes
+
+* **index:** assign empty `module.id` to prevent `contenthash` from changing unnecessarily ([#284](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/284)) ([d7946d0](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/d7946d0))
+
+
+
+
+## [0.4.3](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.4.2...v0.4.3) (2018-09-18)
+
+
+### Bug Fixes
+
+* **loader:** pass `emitFile` to the child compilation (`loaderContext.emitFile`) ([#177](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/177)) ([18c066e](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/18c066e))
+
+
+
+
+## [0.4.2](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.4.0...v0.4.2) (2018-08-21)
+
+
+### Bug Fixes
+
+* use correct order when multiple chunk groups are merged ([#246](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/246)) ([c3b363d](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/c3b363d))
+
+
+
+
+## [0.4.1](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/compare/v0.4.0...v0.4.1) (2018-06-29)
+
+
+### Bug Fixes
+
+* CSS ordering with multiple entry points ([#130](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/issues/130)) ([79373eb](https://github.com/webpack-contrib/extract-css-chunks-webpack-plugin/commit/79373eb))
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+x.x.x /
-
-
+If you like our work, check out our Redux-based router redux-first-router or its sucessor which, Rudy
# extract-css-chunks-webpack-plugin
@@ -9,7 +6,7 @@
-
+
@@ -17,235 +14,606 @@
+
+
+
+
+
+
+
+
Hot Module Replacement
+Hot Module Replacement + CSS modules
++ Lazy CSS: Must be red, but turn green when + . +
++ But turn orange, when + . Additional + clicks have no effect. +
++ Refresh and press buttons in reverse order: This should turn green + instead. +
++ Lazy CSS: Turn off the network and + . +
+An error should have appeared.
++ Now if you turn the network back on and click it again, it should turn + aqua. +
+Preloaded CSS: Must be green.
++ displays + an alert and should turn red. +
+Preloaded inlined CSS: Must be green.
++ displays + an alert and should turn red. +
+CrossOriginLoading Option: Must be red.
++ loads chunks with crossorigin + attribute and should turn green. +
+