Enable symbolic link on shared directory on Vagrant
Add this block to Vagrantfile and run vagrant up
in shel with Administrator right
### Enable symbolic link on shared directory {#enable-symbolic-link-on-shared-directory }
config.vm.provider "virtualbox" do |v|
v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate//vagrant/www", "1"]
end
Install Node.js and NPM
https://www.e2enetworks.com/help/knowledge-base/how-to-install-node-js-and-npm-on-centos/
Install create-react-app
https://reactjs.org/docs/add-react-to-a-new-app.html
Create sample app
- run
create-react-app
on directory which is outside of shared directory - copy all files (instead of directory
node_modules
) to shared directory - create symbolic link from shared directory to outside
node_modules
directory
Auto reload when modify file on windows
$ cd /path/to/root/app
$ vim .env
# Add this line {#add-this-line }
CHOKIDAR_USEPOLLING=true