A Vue.js project
- Build the
dist/
directory:
- $ npm run build
- Install
serve
globally by npm or yarn:
- $ npm install -g serve
- $ yarn --global add serve # install by yarn
- Run the app with
dist/
directory:
- serve dist/
-
Now, open chrome developer tool (
Cmd + Shift + I
) |Network
| CheckOffline
. Now reload the page, it should work as Charm! -
Also go chrome developer tool (
Cmd + Shift + I
) |Application
|Service Workers
. Now, you should see thatstatus
= activated and is running!
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production
npm run build
# build for production and view the bundle analyzer report
npm run build --report
# run unit tests
npm run unit
# run e2e tests
npm run e2e
# run all tests
npm test
For detailed explanation on how things work, checkout the guide and docs for vue-loader.