laravel and webpack transform reactjs not reloading -
i having trouble getting hot reloading work laravel app.
//laravel homepage
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>laravel</title> </head> <body> <div id="root"></div> <?php if (app::islocal()): ?> <script type="text/javascript" src="http://localhost:3000/static/bundle.js"></script> <?php else: ?> <script type="text/javascript" src="/dist/bundle.js"></script> <?php endif; ?> </body> </html>
when go homestead laravel backend page (localhost:8000), works fine, there's no hot reloading when change react components.
when go directly dev-server http://localhost:3000 hot reloading.
i using react transform boilerplate: https://github.com/gaearon/react-transform-boilerplate
how can backend laravel page reload bundle?
change
src="http://localhost:3000/static/bundle.js"
to
src="{{url('static/bundle.js)'}}"
,
src="/dist/bundle.js"
to
src="{{url('/dist/bundle.js')}}"
Comments
Post a Comment