Skip to content

Commit 87c2fc7

Browse files
authored
Add react-dom/server.js as synthetic CJS package (#574)
1 parent fd99f14 commit 87c2fc7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/docs/03-main-concepts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ After Snowpack builds your dependencies, any package can be imported and run dir
4242
<!-- This runs directly in the browser with `snowpack dev` -->
4343
<body>
4444
<script type='module'>
45-
import * as React from 'react';
45+
import React from 'react';
4646
console.log(React);
4747
</script>
4848
</body>

src/commands/install.ts

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class ErrorWithHint extends Error {
6161
const CJS_PACKAGES_TO_AUTO_DETECT = [
6262
'react/index.js',
6363
'react-dom/index.js',
64+
'react-dom/server.js',
6465
'react-is/index.js',
6566
'prop-types/index.js',
6667
'scheduler/index.js',

0 commit comments

Comments
 (0)