@@ -10,6 +10,8 @@ const debugResolver = process.env.KNIGHTED_CSS_DEBUG_MODE === '1'
1010const typesCacheDir = path . resolve ( __dirname , '.knighted-css-mode' )
1111const strictManifestPath = path . join ( typesCacheDir , 'knighted-manifest.json' )
1212const combinedHashedPath = path . join ( 'src' , 'mode' , 'declaration-hashed' )
13+ const declarationHashedDir = / s r c [ \\ / ] m o d e [ \\ / ] d e c l a r a t i o n - h a s h e d /
14+ const declarationStableDir = / s r c [ \\ / ] m o d e [ \\ / ] d e c l a r a t i o n - s t a b l e /
1315
1416export default async ( ) => ( {
1517 mode : 'development' ,
@@ -33,7 +35,7 @@ export default async () => ({
3335 rules : [
3436 {
3537 test : / \. m o d u l e \. c s s $ / ,
36- include : / s r c \/ m o d e \/ d e c l a r a t i o n - h a s h e d / ,
38+ include : declarationHashedDir ,
3739 oneOf : [
3840 {
3941 resourceQuery : / k n i g h t e d - c s s / ,
@@ -74,7 +76,7 @@ export default async () => ({
7476 {
7577 test : / \. [ j t ] s x ? $ / ,
7678 resourceQuery : / k n i g h t e d - c s s / ,
77- include : / s r c \/ m o d e \/ d e c l a r a t i o n - h a s h e d / ,
79+ include : declarationHashedDir ,
7880 use : [
7981 {
8082 loader : '@knighted/css/loader-bridge' ,
@@ -102,7 +104,7 @@ export default async () => ({
102104 {
103105 test : / \. [ j t ] s x ? $ / ,
104106 resourceQuery : / k n i g h t e d - c s s / ,
105- include : / s r c \/ m o d e \/ d e c l a r a t i o n - s t a b l e / ,
107+ include : declarationStableDir ,
106108 use : [
107109 {
108110 loader : '@knighted/css/loader' ,
@@ -128,7 +130,7 @@ export default async () => ({
128130 {
129131 test : / \. [ j t ] s x ? $ / ,
130132 resourceQuery : / k n i g h t e d - c s s / ,
131- exclude : / s r c \/ m o d e \/ ( d e c l a r a t i o n - s t a b l e | d e c l a r a t i o n - h a s h e d ) / ,
133+ exclude : / s r c [ \\ / ] m o d e [ \\ / ] ( d e c l a r a t i o n - s t a b l e | d e c l a r a t i o n - h a s h e d ) / ,
132134 use : [
133135 {
134136 loader : '@knighted/css/loader' ,
@@ -175,7 +177,7 @@ export default async () => ({
175177 } ,
176178 {
177179 test : / \. m o d u l e \. c s s $ / ,
178- exclude : / s r c \/ m o d e \/ d e c l a r a t i o n - h a s h e d / ,
180+ exclude : declarationHashedDir ,
179181 use : [
180182 {
181183 loader : CssExtractRspackPlugin . loader ,
0 commit comments