File tree Expand file tree Collapse file tree
built-in-plugins/command-dev/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ async function debugProject(options?: any) {
6868 const dashboardClientPort = await portfinder . getPortPromise ( { port : freePort + 2 } ) ;
6969
7070 const pipeConfig = async ( config : webpack . Configuration ) => {
71+ if ( pri . sourceConfig . disableDllWhenDev || pri . sourceConfig . disableDllWrapWhenDev ) {
72+ return config ;
73+ }
7174 const dllHttpPath = urlJoin (
7275 `${ globalState . sourceConfig . useHttps ? 'https' : 'http' } ://${ pri . sourceConfig . host } :${ freePort } ` ,
7376 libraryStaticPath ,
@@ -99,7 +102,9 @@ async function debugProject(options?: any) {
99102 return scopeAnalyseInfo ;
100103 } ) ;
101104
102- await bundleDlls ( { dllOutPath, dllFileName, dllMainfestName } ) ;
105+ if ( ! pri . sourceConfig . disableDllWhenDev ) {
106+ await bundleDlls ( { dllOutPath, dllFileName, dllMainfestName } ) ;
107+ }
103108
104109 if ( globalState . sourceConfig . useHttps ) {
105110 logInfo ( 'you should set chrome://flags/#allow-insecure-localhost, to trust local certificate.' ) ;
@@ -315,6 +320,9 @@ function debugProjectPrepare(dashboardClientPort: number) {
315320 if ( ! pri . isDevelopment ) {
316321 return config ;
317322 }
323+ if ( pri . sourceConfig . disableDllWhenDev ) {
324+ return config ;
325+ }
318326
319327 config . plugins . push (
320328 new webpack . DllReferencePlugin ( {
Original file line number Diff line number Diff line change @@ -353,6 +353,16 @@ export class ProjectConfig {
353353 */
354354 public disableDashboard : boolean ;
355355
356+ /**
357+ * Disable dll in dev mode
358+ */
359+ public disableDllWhenDev : boolean ;
360+
361+ /**
362+ * If disable, pri will not wrap dllScript to entry js in dev mode, your should wrap dllScript to html by yourself
363+ */
364+ public disableDllWrapWhenDev : boolean ;
365+
356366 /**
357367 * Publish config for npm publish
358368 */
You can’t perform that action at this time.
0 commit comments