Skip to content

Commit 697a233

Browse files
authored
Change vite-plugin to be a named export (#96)
1 parent f9ca82b commit 697a233

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

.changeset/spicy-deers-agree.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@vanilla-extract/vite-plugin': patch
3+
---
4+
5+
Change vite-plugin to be a named export
6+
7+
BREAKING CHANGE
8+
9+
```diff
10+
-import vanillaExtractPlugin from '@vanilla-extract/vite-plugin';
11+
+import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
12+
13+
// vite.config.js
14+
export default {
15+
plugins: [vanillaExtractPlugin()]
16+
}
17+
```

packages/vite-plugin/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
hash,
99
} from '@vanilla-extract/integration';
1010

11-
export default function vanillaExtractPlugin(): Plugin {
11+
export function vanillaExtractPlugin(): Plugin {
1212
let config: ResolvedConfig;
1313
const cssMap = new Map<string, string>();
1414

test-helpers/src/startFixture/vite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import http from 'http';
33

44
import { createServer, build, InlineConfig } from 'vite';
55
import handler from 'serve-handler';
6-
import vanillaExtractPlugin from '@vanilla-extract/vite-plugin';
6+
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
77

88
import { TestServer } from './types';
99

0 commit comments

Comments
 (0)