Skip to content

Commit eb5565b

Browse files
robertfauskweaverryan
authored andcommitted
convert error into warning
test for successful config set when using devServer and setPublicPath with an absolute URL
1 parent 910b6bc commit eb5565b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/WebpackConfig.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,12 @@ describe('WebpackConfig object', () => {
105105
}).to.throw('The value passed to setPublicPath() must start with "/"');
106106
});
107107

108-
it('Setting to a URL when using devServer throws an error', () => {
108+
it('You can set to a URL when using devServer', () => {
109109
const config = createConfig();
110110
config.runtimeConfig.useDevServer = true;
111+
config.setPublicPath('https://examplecdn.com');
111112

112-
expect(() => {
113-
config.setPublicPath('https://examplecdn.com');
114-
}).to.throw('You cannot pass an absolute URL to setPublicPath() and use the dev-server');
113+
expect(config.publicPath).to.equal('https://examplecdn.com/');
115114
});
116115
});
117116

0 commit comments

Comments
 (0)