Skip to content

Commit cdc75a0

Browse files
committed
fix: plugin-styled
1 parent 8a30828 commit cdc75a0

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.changeset/ripe-forks-spend.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@modern-js/plugin-styled-components': patch
3+
---
4+
5+
fix: plugin-styled-components
6+
fix: 修复 styled-components 插件

packages/cli/plugin-styled-components/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "@modern-js/plugin-styled-components",
3-
"private": true,
43
"description": "A Modern.js plugin for styled-components.",
54
"license": "MIT",
65
"keywords": [

packages/cli/plugin-styled-components/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ export const styledComponentsPlugin = (
2828
});
2929

3030
api._internalRuntimePlugins(async ({ entrypoint, plugins }) => {
31+
const { metaName } = api.getAppContext();
32+
3133
plugins.push({
3234
name: 'styledComponents',
33-
path: '@modern-js/plugin-styled-components/runtime',
35+
path: `@${metaName}/plugin-styled-components/runtime`,
3436
config: {},
3537
});
3638
return { entrypoint, plugins };

0 commit comments

Comments
 (0)