Skip to content

Commit

Permalink
mark @vanilla-extract/css/adapter as external
Browse files Browse the repository at this point in the history
  • Loading branch information
mrm007 committed Feb 27, 2023
1 parent 40e19c4 commit b99882c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/core/src/build.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'fs/promises';
import path from 'path';

import { setAdapter } from '@vanilla-extract/css/adapter';
import { mockAdapter, setAdapter } from '@vanilla-extract/css/adapter';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import react from '@vitejs/plugin-react';
import builtinModules from 'builtin-modules';
Expand Down Expand Up @@ -103,14 +103,7 @@ export const build = async (inlineConfig?: PartialConfig) => {

logger.info(`✅ Successfully built ${chalk.bold('renderer')}!`);

setAdapter({
appendCss: () => {},
registerClassName: () => {},
onEndFileScope: () => {},
registerComposition: () => {},
markCompositionUsed: () => {},
getIdentOption: () => 'short',
});
setAdapter(mockAdapter);

// TODO: use vite-node instead
const { renderAllPages } = (await import(
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const start = async (
external: [
...builtinModules,
'@crackle/router',
'@vanilla-extract/css/adapter',
'serialize-javascript',
'used-styles',
],
Expand Down

0 comments on commit b99882c

Please sign in to comment.