Especially during development when package.json changes nearly all the time. ![]() Waiting for over 6 minutes to build the docker container whenever anything changes in the package.json file is unacceptable. On my slower machines, this process takes nearly half an hour. On my fast machine, this process takes over 6 minutes. Now that you have you project setup we need to focus on getting Webpack setup and doing what it needs to. npm install webpack Getting more than scratch into Webpack. This typically isn’t a problem for smaller npm dependencies that take less than a few seconds to install, but bs-platform installs and compiles an OCaml compiler from scratch. We can now install Webpack, remember you should be using npm 5 for this which saves references of dependencies (like Webpack) to you package-lock.json. ![]() However, when installing npm dependencies in a docker container, any change to the package.json file would trigger a full install of all of the npm packages. The following commands will install the vue-cli tool globally on. ![]() This method works great on a development machine where npm dependencies are cached and only need to be installed again if the package is deleted from the local node_modules directory. The following commands will get us up and running with the webpack-simple template for Vue. The simplest option to include bs-platform in the project is to add it to the dependencies field of package.json and allow NPM (or yarn) to install it locally into the project's node_modules directory.
0 Comments
Leave a Reply. |