Skip to content

Commit

Permalink
Remove contentBase deprecation warning message
Browse files Browse the repository at this point in the history
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 | 	"*": "<your current contentBase configuration>"
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.
  • Loading branch information
ened authored Jun 22, 2017
1 parent 5ccc5f2 commit 581843b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/dummy/client/server-rails-hot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': '*',
},
Expand Down

0 comments on commit 581843b

Please sign in to comment.