File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @vanilla-extract/next-plugin ' : patch
3
+ ---
4
+
5
+ Fix URL statements not not respecting Next's setup for resolving assets
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin';
2
2
import browserslist from 'browserslist' ;
3
3
import { lazyPostCSS } from 'next/dist/build/webpack/config/blocks/css' ;
4
4
import { findPagesDir } from 'next/dist/lib/find-pages-dir' ;
5
+ import { cssFileResolve } from 'next/dist/build/webpack/config/blocks/css/loaders/file-resolve' ;
5
6
import NextMiniCssExtractPluginDefault from 'next/dist/build/webpack/plugins/mini-css-extract-plugin' ;
6
7
7
8
import type webpack from 'webpack' ;
@@ -60,6 +61,18 @@ const getVanillaExtractCssLoaders = (
60
61
postcss,
61
62
importLoaders : 1 ,
62
63
modules : false ,
64
+ url : ( url : string , resourcePath : string ) =>
65
+ cssFileResolve (
66
+ url ,
67
+ resourcePath ,
68
+ options . config . experimental ?. urlImports ,
69
+ ) ,
70
+ import : ( url : string , _ : any , resourcePath : string ) =>
71
+ cssFileResolve (
72
+ url ,
73
+ resourcePath ,
74
+ options . config . experimental ?. urlImports ,
75
+ ) ,
63
76
} ,
64
77
} ) ;
65
78
You can’t perform that action at this time.
0 commit comments