File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
packages/core/src/plugins Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -59,21 +59,15 @@ class EntryChunkPlugin {
5959 }
6060
6161 apply ( compiler : Rspack . Compiler ) {
62- // TODO: contextDependencies now can only be added in `tapPromise` hook.
63- // Change to `.tap` when it's supported.
64- compiler . hooks . afterCompile . tapPromise ( PLUGIN_NAME , ( compilation ) => {
65- return new Promise ( ( resolve ) => {
66- if ( this . contextToWatch === null ) {
67- resolve ( ) ;
68- return ;
69- }
62+ compiler . hooks . afterCompile . tap ( PLUGIN_NAME , ( compilation ) => {
63+ if ( this . contextToWatch === null ) {
64+ return ;
65+ }
7066
71- const contextDep = compilation . contextDependencies ;
72- if ( ! contextDep . has ( this . contextToWatch ) ) {
73- contextDep . add ( this . contextToWatch ) ;
74- }
75- resolve ( ) ;
76- } ) ;
67+ const contextDep = compilation . contextDependencies ;
68+ if ( ! contextDep . has ( this . contextToWatch ) ) {
69+ contextDep . add ( this . contextToWatch ) ;
70+ }
7771 } ) ;
7872
7973 compiler . hooks . make . tap ( PLUGIN_NAME , ( compilation ) => {
You can’t perform that action at this time.
0 commit comments