Skip to content

Commit

Permalink
fix: use cjs version runtime addon
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerFeng committed Sep 12, 2023
1 parent 1da9a72 commit 5fc633d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
19 changes: 13 additions & 6 deletions packages/runtime/plugin-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
".": {
"types": "./dist/types/index.d.ts",
"jsnext:source": "./src/index.ts",
"require": "./dist/cjs/index.js",
"default": "./dist/esm/index.js"
},
"./types": "./types/index.d.ts",
Expand All @@ -36,16 +37,19 @@
"./loadable": {
"types": "./dist/types/exports/loadable.d.ts",
"jsnext:source": "./src/exports/loadable.ts",
"require": "./dist/cjs/exports/loadable.js",
"default": "./dist/esm/exports/loadable.js"
},
"./head": {
"types": "./dist/types/exports/head.d.ts",
"jsnext:source": "./src/exports/head.ts",
"require": "./dist/cjs/exports/head.js",
"default": "./dist/esm/exports/head.js"
},
"./styled": {
"types": "./dist/types/exports/styled.d.ts",
"jsnext:source": "./src/exports/styled.ts",
"require": "./dist/cjs/exports/styled.js",
"default": "./dist/esm/exports/styled.js"
},
"./server": {
Expand Down Expand Up @@ -76,6 +80,7 @@
"./model": {
"types": "./types/model.d.ts",
"jsnext:source": "./src/state/index.ts",
"require": "./dist/cjs/state/index.js",
"default": "./dist/esm/state/index.js"
},
"./cli": {
Expand All @@ -86,11 +91,13 @@
"./router": {
"types": "./dist/types/router/index.d.ts",
"jsnext:source": "./src/router/index.ts",
"require": "./dist/esm/router/index.js",
"default": "./dist/esm/router/index.js"
},
"./router/server": {
"types": "./dist/types/router/runtime/server.d.ts",
"jsnext:source": "./src/router/runtime/server.ts",
"require": "./dist/cjs/router/runtime/server.js",
"default": "./dist/esm/router/runtime/server.js"
},
"./loadable-bundler-plugin": {
Expand Down Expand Up @@ -160,12 +167,12 @@
"@loadable/component": "5.15.3",
"@loadable/server": "5.15.3",
"@loadable/webpack-plugin": "5.15.2",
"@modern-js-reduck/plugin-auto-actions": "^1.1.10",
"@modern-js-reduck/plugin-devtools": "^1.1.10",
"@modern-js-reduck/plugin-effects": "^1.1.10",
"@modern-js-reduck/plugin-immutable": "^1.1.10",
"@modern-js-reduck/react": "^1.1.10",
"@modern-js-reduck/store": "^1.1.10",
"@modern-js-reduck/plugin-auto-actions": "^1.1.11",
"@modern-js-reduck/plugin-devtools": "^1.1.11",
"@modern-js-reduck/plugin-effects": "^1.1.11",
"@modern-js-reduck/plugin-immutable": "^1.1.11",
"@modern-js-reduck/react": "^1.1.11",
"@modern-js-reduck/store": "^1.1.11",
"@modern-js/plugin": "workspace:*",
"@modern-js/types": "workspace:*",
"@modern-js/utils": "workspace:*",
Expand Down
8 changes: 4 additions & 4 deletions packages/runtime/plugin-testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@
"@babel/core": "^7.22.15",
"@babel/preset-env": "^7.22.15",
"@modern-js/babel-preset-app": "workspace:*",
"@modern-js-reduck/plugin-auto-actions": "^1.1.10",
"@modern-js-reduck/plugin-effects": "^1.1.10",
"@modern-js-reduck/plugin-immutable": "^1.1.10",
"@modern-js-reduck/store": "^1.1.10",
"@modern-js-reduck/plugin-auto-actions": "^1.1.11",
"@modern-js-reduck/plugin-effects": "^1.1.11",
"@modern-js-reduck/plugin-immutable": "^1.1.11",
"@modern-js-reduck/store": "^1.1.11",
"@modern-js/babel-compiler": "workspace:*",
"@modern-js/utils": "workspace:*",
"@modern-js/plugin": "workspace:*",
Expand Down
8 changes: 2 additions & 6 deletions packages/storybook/builder/src/addons/preset/preview.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// import { withPluginRuntime } from '../withPluginRuntime';
import { withPluginRuntime } from '../withPluginRuntime';

// FIXME: @modern-js/runtime now is ESM only, but this package
// currently focus on CommonJS, so it cannot import @modern-js/runtime
// directly.
// export const decorators = [withPluginRuntime];
export const decorators = [];
export const decorators = [withPluginRuntime];

0 comments on commit 5fc633d

Please sign in to comment.