Skip to content

Commit 960832b

Browse files
committed
chore: code format 🍉
1 parent b551b52 commit 960832b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/minify.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class LightningCssMinifyPlugin {
2727
const { implementation, ...otherOpts } = opts
2828
if (implementation && typeof implementation.transform !== 'function') {
2929
throw new TypeError(
30-
`[LightningCssMinifyPlugin]: implementation.transform must be an 'lightningcss' transform function. Received ${typeof implementation.transform}`
30+
`[LightningCssMinifyPlugin]: implementation.transform must be an 'lightningcss' transform function. Received ${typeof implementation.transform}`,
3131
)
3232
}
3333

@@ -44,7 +44,7 @@ export class LightningCssMinifyPlugin {
4444

4545
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
4646
compilation.hooks.chunkHash.tap(PLUGIN_NAME, (_, hash) =>
47-
hash.update(meta)
47+
hash.update(meta),
4848
)
4949

5050
if (isWebpack5(compilation)) {
@@ -54,7 +54,7 @@ export class LightningCssMinifyPlugin {
5454
stage: compilation.constructor.PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE,
5555
additionalAssets: true,
5656
},
57-
async () => await this.transformAssets(compilation)
57+
async () => await this.transformAssets(compilation),
5858
)
5959

6060
compilation.hooks.statsPrinter.tap(PLUGIN_NAME, (statsPrinter) => {
@@ -69,7 +69,7 @@ export class LightningCssMinifyPlugin {
6969
} else {
7070
compilation.hooks.optimizeChunkAssets.tapPromise(
7171
PLUGIN_NAME,
72-
async () => await this.transformAssets(compilation)
72+
async () => await this.transformAssets(compilation),
7373
)
7474
}
7575
})
@@ -99,7 +99,7 @@ export class LightningCssMinifyPlugin {
9999
!asset.info.minimized &&
100100
// Filter out by file type
101101
(testRegExp || CSS_FILE_REG).test(asset.name) &&
102-
matchObject({ include, exclude }, asset.name)
102+
matchObject({ include, exclude }, asset.name),
103103
)
104104

105105
await Promise.all(
@@ -132,15 +132,15 @@ export class LightningCssMinifyPlugin {
132132
JSON.parse(result.map!.toString()),
133133
sourceAsString,
134134
map as any,
135-
true
135+
true,
136136
)
137137
: new RawSource(codeString),
138138
{
139139
...asset.info,
140140
minimized: true,
141-
}
141+
},
142142
)
143-
})
143+
}),
144144
)
145145
}
146146
}

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type Wp5Compilation = Compilation & {
2323
}
2424

2525
export const isWebpack5 = (
26-
compilation: Compilation
26+
compilation: Compilation,
2727
): compilation is Wp5Compilation => 'processAssets' in compilation.hooks
2828

2929
let targetsCache: Record<string, Targets> = {}

0 commit comments

Comments
 (0)