我已经用Angular 4设置了Laravel混合。根据文档,我也运行npm run dev
npm run watch
。之后,我也运行了php artisan serve
和gulp watch
.. nowi对打字稿进行了一些更改,但没有体现出来。
我已尝试php artisan serve
用于端口8000
也gulp watch
运行3000
但是键入脚本的更改不能反映
这是laravel混合代码:
"scripts": {
"dev": "node ./node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "node ./node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "node ./node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "node ./node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor",
"precache": "sw-precache --verbose --config=sw-precache-config.js"
},
gulp watch
,npm run dev or watch
和php atrtisan serve
上没有错误