Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Nov 11, 2022
1 parent 0338fb0 commit 7e3ee6d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
4 changes: 1 addition & 3 deletions packages/next/build/webpack-config.ts
Expand Up @@ -1983,9 +1983,7 @@ export default async function getBaseWebpackConfig(
new ReactLoadablePlugin({
filename: REACT_LOADABLE_MANIFEST,
pagesDir,
runtimeAsset: true
? `server/${MIDDLEWARE_REACT_LOADABLE_MANIFEST}.js`
: undefined,
runtimeAsset: `server/${MIDDLEWARE_REACT_LOADABLE_MANIFEST}.js`,
dev,
}),
(isClient || isEdgeServer) && new DropClientPage(),
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/app-dir/app-external.test.ts
Expand Up @@ -90,9 +90,9 @@ describe('app dir - external dependency', () => {
containClientContent(browserClientText)

// support esm module imports on server side, and indirect imports from shared components
expect(serverHtml).toContain('random-module-instance')
expect(serverHtml).toContain('pure-esm-module')
expect(sharedHtml).toContain(
'node_modules instance from client module random-module-instance'
'node_modules instance from client module pure-esm-module'
)
})

Expand Down
@@ -1,4 +1,4 @@
import { name } from 'random-module-instance'
import { name } from 'pure-esm-module'

export default function Page() {
return (
Expand Down
@@ -1,6 +1,6 @@
'use client'

import { name } from 'random-module-instance'
import { name } from 'pure-esm-module'

export default function () {
return `node_modules instance from client module ${name}`
Expand Down
@@ -1,2 +1,2 @@
export const random = ~~(Math.random() * 1e5)
export const name = 'random-module-instance'
export const name = 'pure-esm-module'
@@ -1,5 +1,5 @@
{
"name": "random-module-instance",
"name": "pure-esm-module",
"type": "module",
"exports": {
"import": "./index.js"
Expand Down
1 change: 0 additions & 1 deletion test/e2e/app-dir/rsc-basic/app/shared/page.js
@@ -1,7 +1,6 @@
import ClientFromDirect from '../../components/client'
import ClientFromShared from '../../components/shared'
import SharedFromClient from '../../components/shared-client'
// import Random from '../../components/random-module-instance'
import Bar from '../../components/bar'

export default function Page() {
Expand Down

0 comments on commit 7e3ee6d

Please sign in to comment.