Skip to content

Commit

Permalink
Merge 7c20375 into c3fe54f
Browse files Browse the repository at this point in the history
  • Loading branch information
yoriiis committed Apr 2, 2020
2 parents c3fe54f + 7c20375 commit 3e78a03
Show file tree
Hide file tree
Showing 29 changed files with 814 additions and 388 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -2,7 +2,6 @@ node_modules/
webpack-stats.json
coverage
reports
example/dist/

# stryker temp files
.stryker-tmp
11 changes: 11 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,16 @@
# CHANGELOG

## 5.0.0

### Updates

* Split code into small functions to facilitate testing
* Complete rewrite of tests

### Breaking changes

* Change default value of `outputPath` constructor option from `default` to `null`. If the parameter is omit or `null`, the plugin will use the [`options.output.path`](https://webpack.js.org/configuration/output/#outputpath) option from the Webpack configuration.

## 4.0.3

### Fixes
Expand Down
6 changes: 3 additions & 3 deletions README.md
@@ -1,6 +1,6 @@
# ChunksWebpackPlugin

![Chunks Webpack Plugin](https://img.shields.io/badge/chunks--webpack--plugin-v4.0.3-546e7a.svg?style=for-the-badge) [![TravisCI](https://img.shields.io/travis/com/yoriiis/chunks-webpack-plugin/master?style=for-the-badge)](https://travis-ci.com/yoriiis/chunks-webpack-plugin) [![Coverage Status](https://img.shields.io/coveralls/github/yoriiis/chunks-webpack-plugin?style=for-the-badge)](https://coveralls.io/github/yoriiis/chunks-webpack-plugin?branch=master) [![Mutation testing badge](https://img.shields.io/endpoint?style=for-the-badge&url=https://badge-api.stryker-mutator.io/github.com/yoriiis/chunks-webpack-plugin/master)](https://dashboard.stryker-mutator.io/reports/github.com/yoriiis/chunks-webpack-plugin/master) ![Node.js](https://img.shields.io/node/v/chunks-webpack-plugin?style=for-the-badge) [![Bundlephobia](https://img.shields.io/bundlephobia/minzip/chunks-webpack-plugin?style=for-the-badge)](https://bundlephobia.com/result?p=fela@latest) [![Npm downloads](https://img.shields.io/npm/dm/chunks-webpack-plugin?color=fb3e44&label=npm%20downloads&style=for-the-badge)](https://npmjs.com/package/chunks-webpack-plugin) [![Chat on Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=for-the-badge)](https://discordapp.com/invite/uC8FkDn)
![Chunks Webpack Plugin](https://img.shields.io/badge/chunks--webpack--plugin-v5.0.0-546e7a.svg?style=for-the-badge) [![TravisCI](https://img.shields.io/travis/com/yoriiis/chunks-webpack-plugin/master?style=for-the-badge)](https://travis-ci.com/yoriiis/chunks-webpack-plugin) [![Coverage Status](https://img.shields.io/coveralls/github/yoriiis/chunks-webpack-plugin?style=for-the-badge)](https://coveralls.io/github/yoriiis/chunks-webpack-plugin?branch=master) [![Mutation testing badge](https://img.shields.io/endpoint?style=for-the-badge&url=https://badge-api.stryker-mutator.io/github.com/yoriiis/chunks-webpack-plugin/master)](https://dashboard.stryker-mutator.io/reports/github.com/yoriiis/chunks-webpack-plugin/master) ![Node.js](https://img.shields.io/node/v/chunks-webpack-plugin?style=for-the-badge) [![Bundlephobia](https://img.shields.io/bundlephobia/minzip/chunks-webpack-plugin?style=for-the-badge)](https://bundlephobia.com/result?p=fela@latest) [![Npm downloads](https://img.shields.io/npm/dm/chunks-webpack-plugin?color=fb3e44&label=npm%20downloads&style=for-the-badge)](https://npmjs.com/package/chunks-webpack-plugin) [![Chat on Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=for-the-badge)](https://discordapp.com/invite/uC8FkDn)

The `ChunksWebpackPlugin` create HTML files to serve your webpack bundles. It is very convenient with multiple entry points and it works without configuration.

Expand Down Expand Up @@ -83,9 +83,9 @@ You can pass configuration options to `ChunksWebpackPlugin`. Allowed values are

### `outputPath`

`string = 'default'`
`string = null`

Tells plugin whether to personalize the output path of generated files (need absolute path). By default the plugin will use `output.path` from the Webpack configuration.
Tells plugin whether to personalize the output path of generated files (need absolute path). By default the plugin will use `options.output.path` from the [Webpack configuration](https://webpack.js.org/configuration/output/#outputpath).

```javascript
new ChunksWebpackPlugin({
Expand Down
32 changes: 32 additions & 0 deletions example/dist/chunks-manifest.json
@@ -0,0 +1,32 @@
{
"app-a": {
"styles": [
"css/vendors~app-a~app-b~app-c.css",
"css/app-a.css"
],
"scripts": [
"js/vendors~app-a~app-b~app-c.js",
"js/app-a.js"
]
},
"app-b": {
"styles": [
"css/vendors~app-a~app-b~app-c.css",
"css/app-b.css"
],
"scripts": [
"js/vendors~app-a~app-b~app-c.js",
"js/app-b.js"
]
},
"app-c": {
"styles": [
"css/vendors~app-a~app-b~app-c.css",
"css/app-c.css"
],
"scripts": [
"js/vendors~app-a~app-b~app-c.js",
"js/app-c.js"
]
}
}
1 change: 1 addition & 0 deletions example/dist/css/app-a.css
@@ -0,0 +1 @@
.button{display:block;width:auto;height:auto;background:none;color:#000}
1 change: 1 addition & 0 deletions example/dist/css/app-b.css
@@ -0,0 +1 @@
.button-large{display:block;width:100%;height:auto;background:none;color:#000}
1 change: 1 addition & 0 deletions example/dist/css/app-c.css
@@ -0,0 +1 @@
.button-small{display:block;width:100%;height:auto;background:none;color:#000}
1 change: 1 addition & 0 deletions example/dist/css/vendors~app-a~app-b~app-c.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions example/dist/js/app-a.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/dist/js/app-a.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions example/dist/js/app-b.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/dist/js/app-b.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions example/dist/js/app-c.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e78a03

Please sign in to comment.