Skip to content

Commit f389a56

Browse files
authored
Update babel strategy for server. (#207)
1 parent ddb1beb commit f389a56

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

.core/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ ReactiumBabel.env = {
9999
browsers: ['> 1%', 'IE 11'],
100100
},
101101
};
102+
103+
if (!global.ReactiumWebpack) ReactiumBabel.env.targets = { node: '18' };
104+
102105
ReactiumBabel.Hook.runSync('env', ReactiumBabel.env);
103106

104107
/**

.core/sdk/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import {
1313
} from '@atomic-reactor/reactium-sdk-core';
1414

1515
import { AppContext } from './named-exports';
16-
import { useDispatcherFactory, useStateEffectFactory } from './named-exports';
16+
import {
17+
useDispatcherFactory,
18+
useStateEffectFactory,
19+
} from './named-exports/useDispatcher';
1720
export * from '@atomic-reactor/reactium-sdk-core';
1821
export * from './named-exports';
1922

.core/sdk/named-exports/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ export * from './i18n';
66
export * from './routing';
77
export * from './hookable-component';
88
export * from './app-context';
9-
export * from './useDispatcher';

.core/sdk/named-exports/useDispatcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import _ from 'underscore';
2-
import cc from 'camelcase';
32
import op from 'object-path';
43
import {
54
ComponentEvent,
65
useEventEffect,
76
} from '@atomic-reactor/reactium-sdk-core';
7+
import cc from 'camelcase';
88

99
export const useDispatcherFactory = Reactium => ({ props, state }) => (
1010
type,

.core/server-globals.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import reactiumBootHooks from './boot-hooks';
66
global.rootPath = path.resolve(__dirname, '..');
77

88
module.exports = async () => {
9-
const ReactiumBoot = (await import('reactium-core/sdk')).default;
9+
const ReactiumBoot = (await import('@atomic-reactor/reactium-sdk-core'))
10+
.default;
1011
global.ReactiumBoot = ReactiumBoot;
1112
global.defines = {};
1213

0 commit comments

Comments
 (0)