Skip to content

Commit 1860a67

Browse files
prettier
1 parent 3045e2d commit 1860a67

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/cli/lib/lib/webpack/render-html-plugin.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module.exports = async function (config) {
5353
writeFileSync(template, content);
5454
}
5555

56-
const htmlWebpackConfig = (values) => {
56+
const htmlWebpackConfig = values => {
5757
const { url, title, ...routeData } = values;
5858
return Object.assign(values, {
5959
filename: resolve(dest, url.substring(1), 'index.html'),
@@ -140,9 +140,9 @@ module.exports = async function (config) {
140140

141141
return pages
142142
.map(htmlWebpackConfig)
143-
.map((conf) => new HtmlWebpackPlugin(conf))
143+
.map(conf => new HtmlWebpackPlugin(conf))
144144
.concat([new HtmlWebpackExcludeAssetsPlugin()])
145-
.concat([...pages.map((page) => new PrerenderDataExtractPlugin(page))]);
145+
.concat([...pages.map(page => new PrerenderDataExtractPlugin(page))]);
146146
};
147147

148148
// Adds a preact_prerender_data in every folder so that the data could be fetched separately.
@@ -154,7 +154,7 @@ class PrerenderDataExtractPlugin {
154154
this.data_ = JSON.stringify(cliData.preRenderData || {});
155155
}
156156
apply(compiler) {
157-
compiler.hooks.emit.tap('PrerenderDataExtractPlugin', (compilation) => {
157+
compiler.hooks.emit.tap('PrerenderDataExtractPlugin', compilation => {
158158
let path = this.location_ + PRERENDER_DATA_FILE_NAME;
159159
if (path.startsWith('/')) {
160160
path = path.substr(1);

packages/cli/lib/lib/webpack/transform-config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function parseConfig(config) {
5252

5353
// Detect webpack plugins and return wrapper transforms that inject them
5454
if (typeof fn.prototype.apply === 'function') {
55-
return (config) => {
55+
return config => {
5656
config.plugins.push(new fn(opts));
5757
};
5858
}
@@ -206,7 +206,7 @@ class WebpackConfigHelpers {
206206
getRulesByMatchingFile(config, file) {
207207
let filePath = resolve(this._cwd, file);
208208
return this.getRules(config).filter(
209-
(w) => w.rule.test && w.rule.test.exec(filePath)
209+
w => w.rule.test && w.rule.test.exec(filePath)
210210
);
211211
}
212212

@@ -252,7 +252,7 @@ class WebpackConfigHelpers {
252252
*/
253253
getPluginsByName(config, name) {
254254
return this.getPlugins(config).filter(
255-
(w) =>
255+
w =>
256256
w.plugin && w.plugin.constructor && w.plugin.constructor.name === name
257257
);
258258
}
@@ -269,7 +269,7 @@ class WebpackConfigHelpers {
269269
* @memberof WebpackConfigHelpers
270270
*/
271271
getPluginsByType(config, type) {
272-
return this.getPlugins(config).filter((w) => w.plugin instanceof type);
272+
return this.getPlugins(config).filter(w => w.plugin instanceof type);
273273
}
274274

275275
/**

0 commit comments

Comments
 (0)