# NPM
# gh-pages
$ yarn add gh-pages -D
package.json
"homepage": "https://jacobhsu.github.io/<project-name>/",
"scripts": {
"deploy": "yarn build && gh-pages -d dist"
}
vue.config.js
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? '/<project-name>' : '/',
}
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/<project-name>" : "/"
};
WARNING
'<project-name>' error watch /
https://jacobhsu.github.io/project-name/project-name/css/app.{id}.css
# Vue Cli 2
config\index.js (vue cli 3 vue.config.js)
build: {
..
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/vue-webpack-vuex/',
WARNING
【狀況題】怎麼有時候推不上去 先拉再推
$ git push origin :gh-pages 刪除遠端分支
$ git pull
$ git push origin gh-pages
$ git branch -a 查看所有分支
$ git branch gh-pages 新建遠程分支
# node-sass
WARNING
解决 Cannot find module 'node-sass'
Error: Node Sass does not yet support your current environment: Windows 64-bit with false
npm install node-sass -g
npm uninstall node-sass
npm install node-sass
npm install -D sass-loader node-sass
node-sass 安装失败 Failed at the node-sass@4.9.2 postinstall script.
npm ERR! node-sass@4.9.2 postinstall:
node scripts/build.js
卸载node-sass npm uninstall node-sass
重新安装指定的node-sass版本(安装失败的版本)
npm install node-sass@4.9.0
TypeError: loaderContext.getResolve is not a function
sass-loader 版本过高
npm install -D sass-loader@6.0.6
npm ERR! Failed at the node-sass@4.7.2 postinstall script.
npm uninstall node-sass -D
npm install node-sass -D
Module build failed: Error: Cannot find module 'node-sass'
npm install node-sass@next -D
package.json
"devDependencies": {
"node-sass": "^4.14.1",
}
# NPMs
# Data
# Date
# i18n
Vue I18n Vue I18n is internationalization plugin for Vue.js
# chartjs
vue-chartjs Easy and beautiful charts with Chart.js and Vue.js
# component

📖Documentation
npm install --save vue-nav-tabs
npm install --save babel-helper-vue-jsx-merge-props
# library
# Cli Tool
ex: regreceive / exchange Error: Node Sass does not yet support your current environment: Windows 64-bit with false
# package.json
# unit-testing
# cookie
Try npm install @types/js-cookie if it exists or add a new declaration (.d.ts) file containing declare module 'js-cookie';
yarn add @types/js-cookie
Debug →














