I'm very new with laravel, previously I was on node.js mostly.
We use react with laravel in a new project. I'm confused when I saw this file https://github.com/eriksape/laravel-react-hot-loader/blob/master/gulpfile.js
Why use elixir in gulpfile.js? I thought we can do the gulp way like
gulp.task('watch', function() {
browserSync({
proxy: 'localhost:8000',
middleware: [
webpackDevMiddleware(bundler, {
publicPath: webpackConfig.output.publicPath,
stats: { colors: true }
}),
webpackHotMiddleware(bundler)
]
});
});
But I did tried to use pure gulp, the hot reloading did not work, webpack will bundle everything from scratch again. I wonder what role does elixir is doing here.
If you don't use Elixir, then you don't have to worry about anything.
Just remove references to it and ad your gulp dependencies in your package.json
file, and then execute gulp
as you would normally.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.