From 581843b084c1c08e1b4625097fa74bde1a256c9f Mon Sep 17 00:00:00 2001 From: Sebastian Roth Date: Thu, 22 Jun 2017 22:08:39 +0900 Subject: [PATCH] Remove contentBase deprecation warning message Without the change, I had the error message: 22:05:30 hot-assets.1 | started with pid 9115 22:05:31 hot-assets.1 | yarn run v0.24.5 22:05:31 hot-assets.1 | $ (cd client && yarn run hot-assets) 22:05:31 hot-assets.1 | yarn run v0.24.5 22:05:31 hot-assets.1 | $ NODE_ENV=development babel-node server-rails-hot.js 22:05:33 hot-assets.1 | Webpack HOT dev build for Rails 22:05:33 hot-assets.1 | Using a URL as contentBase is deprecated and will be removed in the next major version. Please use the proxy option instead. 22:05:33 hot-assets.1 | proxy: { 22:05:33 hot-assets.1 | "*": "" 22:05:33 hot-assets.1 | } 22:05:33 hot-assets.1 | Using a URL as contentBase is deprecated and will be removed in the next major version. Please use the proxy option instead. --- spec/dummy/client/server-rails-hot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/dummy/client/server-rails-hot.js b/spec/dummy/client/server-rails-hot.js index 2620955aa5..de7c84bf5f 100644 --- a/spec/dummy/client/server-rails-hot.js +++ b/spec/dummy/client/server-rails-hot.js @@ -25,7 +25,9 @@ const { hotReloadingUrl, hotReloadingPort, hotReloadingHostname } = webpackConfi const compiler = webpack(webpackConfig); const devServer = new WebpackDevServer(compiler, { - contentBase: hotReloadingUrl, + proxy: { + '*': hotReloadingUrl, + }, headers: { 'Access-Control-Allow-Origin': '*', },