Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish authored Aug 17, 2023
2 parents bb6e52a + cb2132f commit 2ade5d7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/next-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @vanilla-extract/next-plugin

## 2.2.2

### Patch Changes

- [#1155](https://github.com/vanilla-extract-css/vanilla-extract/pull/1155) [`1cb537b`](https://github.com/vanilla-extract-css/vanilla-extract/commit/1cb537b04b5733d5d3a697c6f355c44465c9c468) Thanks [@GeeWizWow](https://github.com/GeeWizWow)! - Fix URL statements not not respecting Next's setup for resolving assets

## 2.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vanilla-extract/next-plugin",
"version": "2.2.1",
"version": "2.2.2",
"description": "Zero-runtime Stylesheets-in-TypeScript",
"main": "dist/vanilla-extract-next-plugin.cjs.js",
"module": "dist/vanilla-extract-next-plugin.esm.js",
Expand Down
13 changes: 13 additions & 0 deletions packages/next-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { VanillaExtractPlugin } from '@vanilla-extract/webpack-plugin';
import browserslist from 'browserslist';
import { lazyPostCSS } from 'next/dist/build/webpack/config/blocks/css';
import { findPagesDir } from 'next/dist/lib/find-pages-dir';
import { cssFileResolve } from 'next/dist/build/webpack/config/blocks/css/loaders/file-resolve';
import NextMiniCssExtractPluginDefault from 'next/dist/build/webpack/plugins/mini-css-extract-plugin';

import type webpack from 'webpack';
Expand Down Expand Up @@ -60,6 +61,18 @@ const getVanillaExtractCssLoaders = (
postcss,
importLoaders: 1,
modules: false,
url: (url: string, resourcePath: string) =>
cssFileResolve(
url,
resourcePath,
options.config.experimental?.urlImports,
),
import: (url: string, _: any, resourcePath: string) =>
cssFileResolve(
url,
resourcePath,
options.config.experimental?.urlImports,
),
},
});

Expand Down

0 comments on commit 2ade5d7

Please sign in to comment.