Skip to content

Commit c8b7233

Browse files
committed
Include HTML webpack plugin to make the localization plugin test runnable in a browser.
1 parent 30bf85d commit c8b7233

4 files changed

Lines changed: 216 additions & 3 deletions

File tree

build-tests/localization-plugin-test/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"webpack": "~4.31.0",
1818
"webpack-bundle-analyzer": "~3.6.0",
1919
"webpack-cli": "~3.3.2",
20-
"webpack-dev-server": "~3.9.0"
20+
"webpack-dev-server": "~3.9.0",
21+
"html-webpack-plugin": "~3.2.0"
2122
}
2223
}

build-tests/localization-plugin-test/webpack.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const webpack = require('webpack');
66
const { LocalizationPlugin } = require('@rushstack/localization-plugin');
77
const { SetPublicPathPlugin } = require('@microsoft/set-webpack-public-path-plugin');
88
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
9+
const HtmlWebpackPlugin = require('html-webpack-plugin');
910

1011
module.exports = function(env) {
1112
const configuration = {
@@ -105,7 +106,8 @@ module.exports = function(env) {
105106
name: '[name]_[locale]_[contenthash].js',
106107
isTokenized: true
107108
}
108-
})
109+
}),
110+
new HtmlWebpackPlugin()
109111
]
110112
};
111113

common/config/rush/nonbrowser-approved-packages.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,10 @@
390390
"name": "gulp-typescript",
391391
"allowedCategories": [ "libraries" ]
392392
},
393+
{
394+
"name": "html-webpack-plugin",
395+
"allowedCategories": [ "tests" ]
396+
},
393397
{
394398
"name": "https-proxy-agent",
395399
"allowedCategories": [ "libraries" ]

0 commit comments

Comments
 (0)