From 2c4cb17076236d08c6693af743ffc46bbb00ae20 Mon Sep 17 00:00:00 2001 From: DuCanhGH <75556609+DuCanhGH@users.noreply.github.com> Date: Wed, 30 Nov 2022 14:26:05 +0700 Subject: [PATCH] fix: fixed typing --- src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7677dfee..5fa0e201 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,7 +16,9 @@ import { Fallbacks, PluginOptions } from "./types"; const getRevision = (file: fs.PathOrFileDescriptor) => crypto.createHash("md5").update(fs.readFileSync(file)).digest("hex"); -export default (pluginOptions: PluginOptions = {}): NextConfig => { +const withPWAInit = ( + pluginOptions: PluginOptions = {} +): ((_: NextConfig) => NextConfig) => { return (nextConfig: NextConfig = {}) => ({ ...nextConfig, ...({ @@ -377,4 +379,5 @@ export default (pluginOptions: PluginOptions = {}): NextConfig => { }); }; +export default withPWAInit; export * from "./types";