You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/WebpackConfig.js
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,6 @@
9
9
10
10
'use strict';
11
11
12
-
constchalk=require('chalk');
13
12
constpath=require('path');
14
13
constfs=require('fs');
15
14
@@ -95,8 +94,7 @@ class WebpackConfig {
95
94
*/
96
95
if(publicPath.includes('://')){
97
96
if(this.useDevServer()){
98
-
console.log(chalk.bgYellow.black(' WARNING ')+chalk.yellow(' You should not pass an absolute URL to setPublicPath() and use the dev-server at the same time'));
99
-
console.log();
97
+
thrownewError('You cannot pass an absolute URL to setPublicPath() and use the dev-server at the same time. Try using Encore.isProduction() to only configure your absolute publicPath for production.');
100
98
}
101
99
}else{
102
100
if(publicPath.indexOf('/')!==0){
@@ -131,8 +129,8 @@ class WebpackConfig {
131
129
* @returns {string}
132
130
*/
133
131
getRealPublicPath(){
134
-
// if we're using webpack-dev-server and have no absolute url, use it & add the publicPath
0 commit comments