Skip to content

Commit

Permalink
add request property to NavitaDependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Zn4rK committed Nov 23, 2023
1 parent 9e4ac18 commit e47d5e8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-foxes-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@navita/webpack-plugin': minor
---

fix request property on navita dependency
15 changes: 15 additions & 0 deletions examples/with-next-app-dir/src/app/edge/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { style } from '@navita/css';

const x = style({
background: 'purple',
});

export default function Edge() {
return (
<main>
<div className={x}>Edge.</div>
</main>
);
}

export const runtime = 'edge';
4 changes: 4 additions & 0 deletions packages/webpack-plugin/src/getNavitaDependency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ function createNavitaDependency(webpack: Compiler['webpack']) {
super();
}

get request() {
return this.issuerPath;
}

getResourceIdentifier() {
return `css-module-${this.issuerPath}-${this.cssHash}`;
}
Expand Down

0 comments on commit e47d5e8

Please sign in to comment.