Skip to content

Commit 2fa22ff

Browse files
committed
improve the build
1 parent 0c7feeb commit 2fa22ff

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

scripts/build.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const bundles = [
1212
input: path.resolve('src/index.js'),
1313
external: ['./react-platform'],
1414
plugins: [
15+
replacePlugin({ 'react-platform': './react-platform' }),
1516
resolvePlugin(),
1617
babelPlugin({ exclude: 'node_modules/**' }),
1718
externalsPlugin({ dependencies: true, peerDependecies: true })
@@ -29,6 +30,7 @@ const bundles = [
2930
input: path.resolve('src/index.js'),
3031
external: ['./react-platform'],
3132
plugins: [
33+
replacePlugin({ 'react-platform': './react-platform' }),
3234
resolvePlugin(),
3335
babelPlugin({
3436
exclude: 'node_modules/**',
@@ -49,7 +51,7 @@ const bundles = [
4951
input: path.resolve('src/index.js'),
5052
external: ['./react-platform.cjs'],
5153
plugins: [
52-
replacePlugin({ 'react-platform': 'react-platform.cjs' }),
54+
replacePlugin({ 'react-platform': './react-platform.cjs' }),
5355
resolvePlugin(),
5456
babelPlugin({ exclude: 'node_modules/**' }),
5557
externalsPlugin({ dependencies: true, peerDependecies: true })
@@ -67,7 +69,7 @@ const bundles = [
6769
input: path.resolve('src/index.js'),
6870
external: ['./react-platform.cjs'],
6971
plugins: [
70-
replacePlugin({ 'react-platform': 'react-platform.cjs' }),
72+
replacePlugin({ 'react-platform': './react-platform.cjs' }),
7173
resolvePlugin(),
7274
babelPlugin({
7375
exclude: 'node_modules/**',

src/scheduler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint camelcase: 0 */
22

33
// react platform is set to either react-dom or react-native during test and execution
4-
import { unstable_batchedUpdates } from './react-platform'
4+
import { unstable_batchedUpdates } from 'react-platform'
55
import { globalObj } from './utils'
66

77
// this runs the passed function and delays all re-renders

0 commit comments

Comments
 (0)