Answer the question
In order to leave comments, you need to log in
How to rewrite scripts section in packages.json file?
I have a package that runs on Laravel 7 and would like to rewrite it for Laravel 8. The problem is Laravel-Mix. The old version of the script had support:
"laravel-mix": "^5.0.4",
The new version defaults to:
"laravel-mix": "^6.0.16",
I have this scripts section in my package's packages.json file:
"scripts": {
"dev": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"build": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"lint": "eslint --ext .js,.vue resources/assets/js"
},
"scripts": {
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"production": "mix --production"
}
Answer the question
In order to leave comments, you need to log in
If I understand correctly, it should look like this:
"scripts": {
"build": "mix",
"dev": "mix watch",
"lint": "eslint --ext .js,.vue resources/assets/js"
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question