laravel / nova-issues

556 stars 34 forks source link

Enable VUE Devtools when building an Tool for Nova #939

Closed michaelLoeffelmann closed 6 years ago

michaelLoeffelmann commented 6 years ago

Hi, i just started building a new tool for laravel nova. When i navigate to ./nova-components/MyComponent and run npm run watch, everything is getting compiled and is also running, but i can't see the vue devtools.

By adding Vue.config.devtools = true to MyComponent/resources/js/tool.js, the devtools are available. Is that the only way to enable devtools in webpack's watch-mode?

noahlocke commented 6 years ago

@LrMiLoef did you npm install and npm run dev in your /vendor/laravel/nova directory?

noahlocke commented 6 years ago

33

techouse commented 6 years ago

Here use this bash script if you're lazy like me 😇

#!/bin/sh
cd ./vendor/laravel/nova
mv webpack.mix.js.dist webpack.mix.js
npm i
npm run dev
rm -rf node_modules
cd -
php artisan nova:publish
davidhemphill commented 6 years ago

See solution above.

miharbi commented 6 years ago

Don't you think that this details have to be in the Nova documentation? This and several others stuffs still out of the documentation, now is kind of limbo all the potential that represent the customization of tools/cards/fields, I mean is too basic the actual documentation about it.

tylernathanreed commented 5 years ago

@LrMiLoef @miharbi

I've created a PR to add the script that @techouse wrote to the official documentation.

akimlyubchenko commented 5 years ago

May help https://github.com/vuejs/vue-devtools/issues/190#issuecomment-536451548

jivanrij commented 1 year ago

To get Nova in Vue dev mode, I've added this command to package.json:

"build-nova-dev-mode": "cd ./vendor/laravel/nova && mv webpack.mix.js.dist webpack.mix.js && npm i && npm run dev && rm -rf node_modules && cd - && php artisan nova:publish"
crynobone commented 1 year ago

Again, use npm ci and not npm install

ekazda commented 1 week ago

Here use this bash script if you're lazy like me 😇

#!/bin/sh
cd ./vendor/laravel/nova
mv webpack.mix.js.dist webpack.mix.js
npm i
npm run dev
rm -rf node_modules
cd -
php artisan nova:publish

npm run dev produced dozens of errors for me and broke my local environment. Use this code with caution!