Использовать веб-пакет и реагировать не может горячее обновление в PHP Laravel Framework?
просто скомпилированное вручную обновление.
если бы я посетил HTTP: // локальный: 8080 / WebPack-DEV-сервер /, показать не могу. я не знаю почему?
если я использую веб-пакет и не реагирую на PHP laravel framework. Все было хорошо.
это мой package.json и webpack.config.js
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'webpack/hot/dev-server',
'webpack-dev-server/client?http://localhost:8080',
path.resolve(__dirname, './public/js/asset/test.js'),
],
output: {
path: './public/js/home',
filename: "index.js"},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets:['react','es2015']
}
},
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.scss$/,
loader: 'style!css!sass'
},
{
test: /\.(png|jpg)$/,
loader: 'url?limit=25000'
},
{
test: /\.woff$/,
loader: 'url?limit=100000'
}
]
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.HotModuleReplacementPlugin()
]
};
Попробуйте следующую версию,
{
"name": "alihanniba",
"version": "1.0.0",
"directories": {
"test": "tests"
},
"main": "public/js/home/index.js",
"private": true,
"author": "alihanniba",
"license": "MIT",
"description": "https://www.alihanniba.com",
"scripts": {
"test": "https://www.alihanniba.com",
"build": "webpack",
"dev": "webpack-dev-server --devtool eval --progress --colors --hot --content-base build"
},
"repository": {
"type": "git",
"url": "https://git.coding.net/alihanniba/alihanniba.git"
},
"devDependencies": {
"webpack": "^1.13.0",
"babel-core": "^6.8.0",
"babel-loader": "^6.2.4",
"babel-plugin-transform-runtime": "^6.8.0",
"css-loader": "^0.23.1",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"gulp": "^3.8.8"
},
"dependencies": {"babel-cli": "^6.8.0",
"babel-plugin-transform-class-properties": "^6.8.0",
"babel-polyfill": "^6.8.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"babel-runtime": "^6.6.1",
"bootstrap-sass": "^3.0.0",
"css-loader": "^0.23.1",
"es6-promise": "^3.1.2",
"es6-shim": "^0.35.0",
"file-loader": "^0.8.5",
"html-loader": "^0.4.3",
"jquery": "^2.2.3",
"laravel-elixir": "^4.0.0",
"react": "^15.0.2",
"react-dom": "^15.0.2",
"react-hot-loader": "^1.3.0",
"react-router": "^2.4.0",
"sass-loader": "^3.2.0",
"url-loader": "^0.5.7",
"webpack": "^1.13.0",
"webpack-dev-middleware": "^1.6.1",
"webpack-dev-server": "^1.14.1",
"webpack-hot-middleware": "^2.10.0"
}
}
Других решений пока нет …