OwenMelbz / nova-watcher

⏰ Basic watcher for Laravel Nova components
2 stars 0 forks source link

It add public files to root of the project #3

Open sidigi opened 5 years ago

OwenMelbz commented 5 years ago

Sorry I don't understand, can you provide an example?

Thanks

sidigi commented 5 years ago

Yep

When I run comand yarn dev in my root project folder every nova component (nova-components folder) are build in my public/nova-components/*/dist

It's wrong, it must be in every single nova component folder for example in /nova-components/MyCustomTool/dist/js/tool.js

Sorry for my english

OwenMelbz commented 5 years ago

Which version of laravel-mix are you using?

And can you share your webpack.mix.js please?

--

Would it be possible for you to share your repo with me so I can investigate more easily?

sidigi commented 5 years ago

"version": "1.7.2"

const mix = require('mix');
const novaWatcher = require('nova-watcher');

mix.js('resources/assets/js/app.js', 'public/js')
    .sass('resources/assets/sass/app.scss', 'public/css')
    .copyDirectory('resources/assets/src', 'public')
    .version();

new novaWatcher(mix); // Create a new instance of nova-watcher and bind your mix instance.
sidigi commented 5 years ago

Also there is no supprot for nova assets and nova tools, only for nova fields

Producdevity commented 5 years ago

I've got the same problem, I think that is happens because mix.setPublicPath('dist') isn't callet so it defaults to 'public'