diff --git a/.changeset/six-bananas-attack.md b/.changeset/six-bananas-attack.md new file mode 100644 index 00000000..4f91d4c0 --- /dev/null +++ b/.changeset/six-bananas-attack.md @@ -0,0 +1,9 @@ +--- +"@ducanh2912/next-pwa": minor +--- + +feat: added `PluginOptions.browserslist` + +- This defaults to `"chrome >= 56"`, same with Workbox's default. +- Note that `.browserslistrc`, `package.json.browserslist`, etc. are not supported (yet), and the only way to pass the config to `next-pwa` is `PluginOptions.browserslist`, but you can read the file yourself, parse it, then pass it to `next-pwa`. +- This allows you to configure which browsers you want to target your workers for. This tells `next-pwa` to add `PluginOptions.workboxOptions.babelPresetEnvTargets` if that option is not defined, which means that the service worker will, too, be bundled to target these browsers, but you can change that by adding the option. diff --git a/.changeset/tall-rocks-know.md b/.changeset/tall-rocks-know.md new file mode 100644 index 00000000..eb7f4f0a --- /dev/null +++ b/.changeset/tall-rocks-know.md @@ -0,0 +1,7 @@ +--- +"@ducanh2912/next-pwa": minor +--- + +feat: support Next's new logging style + +- So Next changed its logging style again, and I'm wondering if trying to match its logging style is even a good idea. diff --git a/docs/next.config.js b/docs/next.config.js index 80827319..bde6975c 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -16,7 +16,6 @@ const withPWA = withPWAInit({ const nextConfig = { output: "export", experimental: { - appDir: true, extensionAlias: { ".js": [".js", ".ts", ".tsx"], }, diff --git a/docs/package.json b/docs/package.json index a86004c7..316b1edb 100644 --- a/docs/package.json +++ b/docs/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@ducanh2912/next-pwa": "workspace:*", - "@mantine/hooks": "6.0.19", - "@tabler/icons-react": "2.32.0", + "@mantine/hooks": "6.0.20", + "@tabler/icons-react": "2.34.0", "bright": "0.8.4", "client-only": "0.0.1", "contentlayer": "0.3.4", @@ -23,33 +23,33 @@ "react-wrap-balancer": "1.1.0", "server-only": "0.0.1", "tailwind-merge": "1.14.0", - "uuid": "9.0.0", + "uuid": "9.0.1", "zustand": "4.4.1" }, "devDependencies": { "@types/extend": "3.0.1", "@types/hast": "3.0.0", "@types/mdast": "4.0.0", - "@types/mdx": "2.0.6", - "@types/node": "20.5.1", - "@types/react": "18.2.20", + "@types/mdx": "2.0.7", + "@types/node": "20.6.1", + "@types/react": "18.2.21", "@types/react-dom": "18.2.7", - "@types/uuid": "9.0.2", + "@types/uuid": "9.0.4", "autoprefixer": "10.4.15", "extend": "3.0.2", "github-slugger": "2.0.0", "hast-util-has-property": "3.0.0", "hast-util-heading-rank": "3.0.0", - "hast-util-to-string": "2.0.0", + "hast-util-to-string": "3.0.0", "mdast-util-mdx": "3.0.0", "mdast-util-to-markdown": "2.1.0", "mdast-util-to-string": "4.0.0", "mdx-bundler": "9.2.1", - "postcss": "8.4.28", - "rehype-highlight": "6.0.0", - "rehype-sanitize": "5.0.1", + "postcss": "8.4.29", + "rehype-highlight": "7.0.0", + "rehype-sanitize": "6.0.0", "tailwindcss": "3.3.3", - "typescript": "5.3.0-dev.20230822", + "typescript": "5.3.0-dev.20230915", "unified": "10.1.2", "unist-util-is": "6.0.0", "unist-util-visit": "5.0.0" diff --git a/examples/basic/app/appdir/about/Button.tsx b/examples/basic/app/about/Button.tsx similarity index 100% rename from examples/basic/app/appdir/about/Button.tsx rename to examples/basic/app/about/Button.tsx diff --git a/examples/basic/app/appdir/about/page.tsx b/examples/basic/app/about/page.tsx similarity index 50% rename from examples/basic/app/appdir/about/page.tsx rename to examples/basic/app/about/page.tsx index c068ecb1..ffc41256 100644 --- a/examples/basic/app/appdir/about/page.tsx +++ b/examples/basic/app/about/page.tsx @@ -1,12 +1,9 @@ -import Link from "next/link"; - import { Button } from "./Button"; export default function Page() { return ( <> -

This is the basic example.

- Home page +

This is the most basic example of using next-pwa.