File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,18 @@ def with_dev_server
9898 next
9999 end
100100 # Make sure the dev server is up:
101- file = open ( "http://localhost:8080/packs/application.js" )
102- if !example_asset_path . start_with? ( "http://localhost:8080" ) && ! file
103- raise "Manifest doesn't include absolute path to dev server"
101+ if MAJOR < 3
102+ file = open ( "http://localhost:8080/packs/application.js" )
103+ if !example_asset_path . start_with? ( "http://localhost:8080" ) && ! file
104+ raise "Manifest doesn't include absolute path to dev server"
105+ end
106+ else
107+ # Webpacker proxies the dev server when Rails is running in Webpacker 3
108+ # so the manifest doens't have absolute paths anymore..
109+ file = open ( "http://localhost:8080#{ example_asset_path } " )
110+ if ! file
111+ raise "Webpack Dev Server hasn't started yet"
112+ end
104113 end
105114
106115 detected_dev_server = true
You can’t perform that action at this time.
0 commit comments