Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vue - Compile other folder outside of /src in Vue.js project

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

enter image description here

https://cli.vuejs.org/guide/webpack.html#simple-configuration

like image 508
test Avatar asked Oct 03 '18 19:10

test


1 Answers

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.

like image 150
test Avatar answered Sep 17 '22 14:09

test