Skip to content

Commit 90b3ecc

Browse files
committed
chore: put dll example in sub directory
1 parent a9d4886 commit 90b3ecc

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ NOTE: This plugin requires `html-webpack-plugin@^2.10.0`.
2424

2525
## Migrating to webpack 4+
2626

27-
After webpack 4+, it is required to apply `AddAssetHtmlPlugin` after `HtmlWebpackPlugin` to register `html-webpack-plugin-before-html-generation` hook which is used inside first, while previous versions of webpack do not care about it.
27+
After webpack 4+, it is required to apply `AddAssetHtmlPlugin` after
28+
`HtmlWebpackPlugin` to register `html-webpack-plugin-before-html-generation`
29+
hook which is used inside first, while previous versions of webpack do not care
30+
about it.
2831

2932
## Basic Usage
3033

@@ -139,8 +142,8 @@ Can be set to `css` to create a `link`-tag instead of a `script`-tag.
139142

140143
Note: Remember to build the DLL file in a separate build.
141144

142-
See [example](example/) for an example of how to set it up. You can run it by
143-
cloning this repo, running `yarn` followed by `yarn run example`.
145+
See [example](example/dll/) for an example of how to set it up. You can run it
146+
by cloning this repo, running `yarn` followed by `yarn run example`.
144147

145148
When adding assets, it's added to the start of the array, so when
146149
`html-webpack-plugin` injects the assets, it's before other assets. If you
File renamed without changes.
File renamed without changes.

example/webpack.config.js renamed to example/dll/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path');
22
const webpack = require('webpack');
33
const HtmlWebpackPlugin = require('html-webpack-plugin');
4-
const AddAssetHtmlPlugin = require('../');
4+
const AddAssetHtmlPlugin = require('../../');
55

66
module.exports = {
77
// Normally CWD

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
],
99
"main": "lib/index.js",
1010
"scripts": {
11-
"clean": "del-cli lib/ coverage/ example/build example/dist",
11+
"clean": "del-cli lib/ coverage/ example/*/build example/*/dist",
1212
"build": "babel src/ --out-dir lib/",
1313
"cover": "jest --coverage",
1414
"preexample": "npm run clean && npm run build",
15-
"example": "webpack --config example/webpack.config.dll.js && webpack --config example/webpack.config.js",
15+
"example": "npm run example:dll",
16+
"example:dll": "webpack --config example/dll/webpack.config.dll.js && webpack --config example/dll/webpack.config.js",
1617
"lint": "eslint .",
1718
"update-license": "licensor --width 72",
1819
"build-and-update-license": "npm run build && npm run update-license",

0 commit comments

Comments
 (0)