Answer the question
In order to leave comments, you need to log in
How to set up a workspace offline to work with webpack and vue-cli?
Dear gurus, there is no direct access to the Internet in the workplace. I am a beginner and want to learn modern development techniques (loved working with Vue.js). How can I organize my workplace?
As far as I understand, I can bring the copied webpack modules and already build locally.
The magic of how webpack works for me is not yet available.
Can you explain step by step (guide):
1. What needs to be installed locally (node.js, wamp installed)?
2. How will local development work?
3. How then to publish all this? (just copying the project will not work, right?)
Answer the question
In order to leave comments, you need to log in
Good afternoon. On the machine on which you will work offline, you need to install node.js version above 4.
Next, on the machine where you have access to the Internet and node.js is also installed, do this
: 1. npm install -g vue-cli
2. vue init webpack
3 npm i
4. Run npm run dev (check that everything works)
4.1 If desired, immediately install the necessary libraries axios, vuex, vuetify and etc.
5. We pack everything into an archive including node_modules
6. Unpack the archive on a machine without Internet and execute npm run dev (check that everything works)
If you need to put all this in git, we do the reverse operation, taking the changed files (excluding node_modules) to the machine with the Internet and, for example, publishing them to github. If we are talking about publishing a project on a hosting, then we execute npm run build and take the files from the dist folder and then upload them to the hosting.
PS I would like to note that it is advisable not to transfer Windows - Linux and vice versa, because if you choose to use sass, for example, then the binaries will be split and npm will be installed under the desired system and will not work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question