diff --git a/.changeset/orange-foxes-develop.md b/.changeset/orange-foxes-develop.md new file mode 100644 index 0000000..3d1cba7 --- /dev/null +++ b/.changeset/orange-foxes-develop.md @@ -0,0 +1,5 @@ +--- +'@navita/webpack-plugin': minor +--- + +fix request property on navita dependency diff --git a/examples/with-next-app-dir/src/app/edge/page.tsx b/examples/with-next-app-dir/src/app/edge/page.tsx new file mode 100644 index 0000000..aafba2b --- /dev/null +++ b/examples/with-next-app-dir/src/app/edge/page.tsx @@ -0,0 +1,15 @@ +import { style } from '@navita/css'; + +const x = style({ + background: 'purple', +}); + +export default function Edge() { + return ( +
+
Edge.
+
+ ); +} + +export const runtime = 'edge'; diff --git a/packages/webpack-plugin/src/getNavitaDependency.ts b/packages/webpack-plugin/src/getNavitaDependency.ts index d11c840..455d29c 100644 --- a/packages/webpack-plugin/src/getNavitaDependency.ts +++ b/packages/webpack-plugin/src/getNavitaDependency.ts @@ -23,6 +23,10 @@ function createNavitaDependency(webpack: Compiler['webpack']) { super(); } + get request() { + return this.issuerPath; + } + getResourceIdentifier() { return `css-module-${this.issuerPath}-${this.cssHash}`; }