File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/runtime/plugin-runtime/src/document/cli Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ const generateEntryCode = (docPath: string, _entryName: string): string => {
256
256
return `var React = require('react');
257
257
var ReactDomServer = require('react-dom/server');
258
258
var exp = require(${ JSON . stringify ( docPath ) } );
259
- var DocumentContext = require('@modern-js /runtime/document').DocumentContext;
259
+ var DocumentContext = require('@meta /runtime/document').DocumentContext;
260
260
261
261
var Document = exp && exp.default;
262
262
@@ -433,6 +433,13 @@ export const documentPlugin = (): CliPlugin<AppTools> => ({
433
433
}
434
434
435
435
api . config ( ( ) => ( {
436
+ resolve : {
437
+ alias : {
438
+ '@meta/runtime/document$' : require
439
+ . resolve ( '../' )
440
+ . replace ( `${ path . sep } cjs${ path . sep } ` , `${ path . sep } esm${ path . sep } ` ) ,
441
+ } ,
442
+ } ,
436
443
tools : {
437
444
bundlerChain : ( chain : RspackChain ) => {
438
445
chain
You can’t perform that action at this time.
0 commit comments