Skip to content

Commit

Permalink
dep(@umijs/preset-umi): @umijs/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinbao1001 committed Sep 26, 2024
1 parent 7aeaa18 commit 77b8f29
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 41 deletions.
11 changes: 7 additions & 4 deletions examples/ssr-demo/.umirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ export default {
routePrefetch: {},
manifest: {},
clientLoader: {},
ssr: {},
exportStatic: {},
// mako: {},
// mako: {
// plugins: [
// {
// load: () => {},
// },
// ],
// },
ssr: {
// builder: 'mako',
},
exportStatic: {},
// ssr: {
// // builder: 'mako',
// },
// exportStatic: {},
styles: [`body { color: red; }`],

metas: [
Expand Down
6 changes: 2 additions & 4 deletions examples/ssr-demo/mako.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"optimization": {
"skipModules": true,
"concatenateModules": false
}
"moduleIdStrategy": "named",
"devtool": false
}
4 changes: 3 additions & 1 deletion examples/ssr-demo/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import './index.less';
import styles from './index.less';
// @ts-ignore
import umiLogo from './umi.png';
// @ts-ignore
import styles1 from './a.module.css';

export default function HomePage() {
const clientLoaderData = useClientLoaderData();
Expand All @@ -40,7 +42,7 @@ export default function HomePage() {

return (
<div>
<h1 className="title">Hello~</h1>
<h1 className={styles1.b}>Hello~1</h1>
<p className="server_inserted_style">id: {id}</p>
<p className={styles.blue}>This is index.tsx</p>
<p className={cssStyle.title}>I should be pink</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/preset-umi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@umijs/ast": "workspace:*",
"@umijs/babel-preset-umi": "workspace:*",
"@umijs/bundler-esbuild": "workspace:*",
"@umijs/bundler-mako": "0.8.13",
"@umijs/bundler-mako": "0.8.14",
"@umijs/bundler-utils": "workspace:*",
"@umijs/bundler-vite": "workspace:*",
"@umijs/bundler-webpack": "workspace:*",
Expand Down
62 changes: 31 additions & 31 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 77b8f29

Please sign in to comment.