Skip to content

Commit 1e097d5

Browse files
committed
fix: suppress vite sourcemap warning
1 parent 1fc0b67 commit 1e097d5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

packages/vite/src/index.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
1-
import { babelTransform, compile, BabelOptions } from '@macaron-css/integration';
1+
import {
2+
babelTransform,
3+
compile,
4+
BabelOptions,
5+
} from '@macaron-css/integration';
26
import { processVanillaFile } from '@vanilla-extract/integration';
37
import fs from 'fs';
48
import { join, resolve } from 'path';
5-
import { normalizePath, PluginOption, ResolvedConfig, ViteDevServer } from 'vite';
9+
import {
10+
normalizePath,
11+
PluginOption,
12+
ResolvedConfig,
13+
ViteDevServer,
14+
} from 'vite';
615

716
const extractedCssFileFilter = /extracted_(.*)\.css\.ts(\?used)?$/;
817

9-
export function macaronVitePlugin(options?: { babel?: BabelOptions }): PluginOption {
18+
export function macaronVitePlugin(options?: {
19+
babel?: BabelOptions;
20+
}): PluginOption {
1021
let config: ResolvedConfig;
1122
let server: ViteDevServer;
1223
const cssMap = new Map<string, string>();
@@ -219,6 +230,7 @@ export function macaronVitePlugin(options?: { babel?: BabelOptions }): PluginOpt
219230

220231
return {
221232
code,
233+
map: { mappings: '' },
222234
};
223235
}
224236

0 commit comments

Comments
 (0)