File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,15 @@ if (runtimeConfig.outputJson) {
30
30
process . argv . splice ( 2 , 1 ) ;
31
31
32
32
// remove arguments not supported by webpack/-dev-server
33
- const encoreOnlyArguments = new Set ( [ '--keep-public-path' , '--public' ] ) ;
33
+ const encoreOnlyArguments = new Set ( [ '--keep-public-path' ] ) ;
34
34
process . argv = process . argv . filter ( arg => ! encoreOnlyArguments . has ( arg ) ) ;
35
35
36
+ // remove argument --public not supported by webpack/dev-server
37
+ const indexPublicArgument = process . argv . indexOf ( '--public' ) ;
38
+ if ( indexPublicArgument !== - 1 ) {
39
+ process . argv . splice ( indexPublicArgument , 2 ) ;
40
+ }
41
+
36
42
if ( ! runtimeConfig . isValidCommand ) {
37
43
if ( runtimeConfig . command ) {
38
44
console . log ( chalk . bgRed . white ( `Invalid command "${ runtimeConfig . command } "` ) ) ;
You can’t perform that action at this time.
0 commit comments