nativescript-vue / vue-cli-plugin-nativescript-vue

A vue cli 3.x plugin for NativeScript-Vue
MIT License
138 stars 27 forks source link

Webpack error when running preview:android after adding this plugin to an existing Laravel / Vue.js web app #44

Open mreall opened 4 years ago

mreall commented 4 years ago

I have an existing Laravel (6.x) / Vue.js (2.x) project into which I'd like to add nativescript-vue. I installed nativescript and ran tns doctor successfully. I installed the [vue-cli-plugin-nativescript-vue plugin][1], then copied the files from ns-example to the root directory of my project (including the src/ folder, .env.* files, babel.config.js, and nsconfig.json).

Now, when I try running npm run preview:android and scan the QR code on my android phone, I get the following messages and Webpack error:

Preparing project...
starting nativeConfig
Bundling application for entryPath .\main.native...
 WARN  A new version of sass-loader is available. Please upgrade for best experience.
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.plugins[2] misses the property 'apply'.
   function
   -> The run point of the plugin, required method.

Any suggestions on what I did wrong?

arpit2438735 commented 3 years ago

I am also facing with same issue. @mreall did it fix for you?

mreall commented 3 years ago

@arpit2438735 I ended up running separate projects for my Vue and NativeScript apps. Ultimately I'm glad I did as there's enough customization required for each that trying to keep them together would have been extremely challenging or would have impacted the UX.

arpit2438735 commented 3 years ago

@mreall ok.Thanks for the info 👍