I have a regular Vue.js project (created using v3.0.3) that uses WebSockets. Also in the project root is the /server
folder which has the Node.js code that houses the multi-player aspect and socket code.
However, since the folder /server
is independent of the /src
folder from the Vue.js project, how do I make use of the Vue CLI webpack config and add babel compiling (using Webpack) to appropriately compile both the /src
https://cli.vuejs.org/guide/webpack.html#simple-configuration
I was able to import babel-cli and just compile/run like so:
./node_modules/.bin/nodemon --exec babel-node --presets env,stage-2 server.js
and it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With