Skip to content

Commit

Permalink
[material] Fix: remove zero-runtime peer dep (#40999)
Browse files Browse the repository at this point in the history
  • Loading branch information
brijeshb42 committed Feb 8, 2024
1 parent 3cd55d3 commit 3ab0181
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
2 changes: 2 additions & 0 deletions apps/zero-runtime-next-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

If you see and error like package `@mui/zero-runtime` not found, add it as a peer-dependency in `@mui/material`'s `package.json` file and run `pnpm build` and `pnpm install` again. Make sure to not push this change to git.

### Note

If you are testing changes in zero-runtime packages itself while also running this demo app, start the watch command in a separate terminal to watch and build zero-runtime package files as they change -
Expand Down
24 changes: 9 additions & 15 deletions apps/zero-runtime-vite-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,23 @@ This project is not part of the workspace yet.

## How to run

You can either run `yarn release:build` command to build all the packages, or you need to build, the the minimum -
You can either run `pnpm build` command to build all the packages, or you need to build, the the minimum -

1. `@mui/zero-runtime`
2. `@mui/zero-tag-processor`
3. `@mui/zero-vite-plugin`
2. `@mui/zero-vite-plugin`

Make sure you have also run `yarn release:build` at least once because we also use `@mui/material` and `@mui/system` packages. On subsequent runs, you can only build the above packages using -
Make sure you have also run `pnpm release:build` at least once because we also use `@mui/material` and `@mui/system` packages. On subsequent runs, you can only build the above packages using -

```bash
yarn build
pnpm build
```

After building, you can run the project by changing into the directory and then

1. Install dependencies using `yarn install`
2. Start the dev server using `yarn dev`
3. Build the code using `yarn build`
1. Install dependencies using `pnpm install`
2. Start the dev server using `pnpm dev`
3. Build the code using `pnpm build`

Optionally, before running the dev server, you can run `yarn vite optimize --force` if it logged some error during `yarn vite`.
Optionally, before running the dev server, you can run `pnpm vite optimize --force` if it logged some error during `pnpm vite`.

### Testing

This demo app has been configured to run tests using both vitest or jest.

1. Vitest - You can run `yarn test` to run the tests using vitest
2. Jest - You can run `yarn jest` to run the tests using jest
If you see and error like package `@mui/zero-runtime` not found, add it as a peer-dependency in `@mui/material`'s `package.json` file and run `pnpm build` and `pnpm install` again. Make sure to not push this change to git.
4 changes: 0 additions & 4 deletions packages/mui-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@mui/system": "workspace:^",
"@mui/types": "workspace:^",
"@mui/utils": "workspace:^",
"@mui/zero-runtime": "workspace:^",
"@types/react-transition-group": "^4.4.10",
"clsx": "^2.1.0",
"csstype": "^3.1.3",
Expand Down Expand Up @@ -104,9 +103,6 @@
},
"@emotion/styled": {
"optional": true
},
"@mui/zero-runtime": {
"optional": true
}
},
"sideEffects": false,
Expand Down

0 comments on commit 3ab0181

Please sign in to comment.