Skip to content

Commit 910b6bc

Browse files
robertfauskweaverryan
authored andcommitted
convert error into warning
when using dev-server and an absolute URL for publicPath to get webpack encore working in docker environment
1 parent 4ad8d88 commit 910b6bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/WebpackConfig.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
'use strict';
1111

12+
const chalk = require('chalk');
1213
const path = require('path');
1314
const fs = require('fs');
1415

@@ -94,7 +95,8 @@ class WebpackConfig {
9495
*/
9596
if (publicPath.includes('://')) {
9697
if (this.useDevServer()) {
97-
throw new Error('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.');
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();
98100
}
99101
} else {
100102
if (publicPath.indexOf('/') !== 0) {

0 commit comments

Comments
 (0)