Skip to content

Commit

Permalink
Final fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brijeshb42 committed Jan 31, 2024
1 parent b8fba7c commit f25000a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 27 deletions.
8 changes: 2 additions & 6 deletions apps/zero-runtime-vite-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { styled, generateAtomics, css } from '@mui/zero-runtime';
import { styled, generateAtomics } from '@mui/zero-runtime';
import type { Breakpoint } from '@mui/system';
import { Button, bounceAnim } from 'local-ui-lib';
import Slider from './Slider/ZeroSlider';
Expand Down Expand Up @@ -58,11 +58,7 @@ export function App({ isRed }: AppProps) {
const [isHorizontal, setIsHorizontal] = React.useState(true);

return (
<div
className={css`
color: red;
`}
>
<div>
<ShowCaseDiv>
<Button>This button&apos;s text color has been overridden.</Button>
</ShowCaseDiv>
Expand Down
8 changes: 8 additions & 0 deletions apps/zero-runtime-vite-app/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@ export default defineConfig({
reactPlugin(),
splitVendorChunkPlugin(),
],
resolve: {
alias: [
{
find: /^@mui\/system\/(.*)/,
replacement: '@mui/system/esm/$1',
},
],
},
});
2 changes: 1 addition & 1 deletion packages/zero-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"publishConfig": {
"access": "public"
},
"linaria": {
"wyw-in-js": {
"tags": {
"styled": "./exports/styled.js",
"default": "./exports/styled.js",
Expand Down
1 change: 0 additions & 1 deletion packages/zero-runtime/src/processors/generateAtomics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export class GenerateAtomicsProcessor extends BaseProcessor {
}

doRuntimeReplacement(): void {
console.log(this.runtimeConfig);
if (!this.runtimeConfig) {
this.doEvaltimeReplacement();
return;
Expand Down
3 changes: 0 additions & 3 deletions packages/zero-unplugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import {
createUnplugin,
UnpluginOptions,
} from 'unplugin';
// import type { PluginOptions as LinariaPluginOptions, Preprocessor } from '@linaria/babel-preset';
// import { TransformCacheCollection, transform } from '@linaria/babel-preset';
// import { createPerfMeter, asyncResolveFallback, slugify } from '@linaria/utils';
import {
preprocessor as basePreprocessor,
generateTokenCss,
Expand Down
4 changes: 2 additions & 2 deletions packages/zero-vite-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ export function zeroVitePlugin(options: ZeroVitePluginOptions) {
},
load(id) {
if (id === VIRTUAL_CSS_FILE) {
return generateTokenCss(theme);
return generateTokenCss(theme as BaseTheme);
}
if (id === VIRTUAL_THEME_FILE) {
return `export default ${JSON.stringify(generateThemeTokens(theme))};`;
return `export default ${JSON.stringify(generateThemeTokens(theme as BaseTheme))};`;
}
return null;
},
Expand Down
5 changes: 0 additions & 5 deletions packages/zero-vite-plugin/src/zero-vite-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ import path from 'node:path';
import type { ModuleNode, Plugin, ResolvedConfig, ViteDevServer, FilterPattern } from 'vite';
import { optimizeDeps, createFilter } from 'vite';

// import { transform, slugify, TransformCacheCollection } from '@linaria/babel-preset';
// import type { PluginOptions, Preprocessor } from '@linaria/babel-preset';
// import { linariaLogger } from '@linaria/logger';
// import type { IPerfMeterOptions } from '@linaria/utils';
// import { createPerfMeter, getFileIdx, syncResolve } from '@linaria/utils';
import { slugify, logger as wywLogger, syncResolve } from '@wyw-in-js/shared';
import {
TransformCacheCollection,
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f25000a

Please sign in to comment.