You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
liuyiliang 1f1b2cf349 fc 4 months ago
..
build fc 4 months ago
public fc 4 months ago
src fc 4 months ago
test fc 4 months ago
.babelrc fc 4 months ago
.editorconfig fc 4 months ago
.eslintignore fc 4 months ago
.eslintrc fc 4 months ago
.gitignore fc 4 months ago
.prettierignore fc 4 months ago
.prettierrc fc 4 months ago
README.md fc 4 months ago
package-lock.json fc 4 months ago
package.json fc 4 months ago
tsconfig.json fc 4 months ago

README.md

开始项目

国内访问 npm 比较慢,我们可以使用阿里的镜像, 在 npm 或者 yarn 命令后面加参数:

--registry=https://registry.npm.taobao.org 例:

npm install --registry=https://registry.npm.taobao.org
yarn --registry=https://registry.npm.taobao.org

详情地址: http://npm.taobao.org/

Node安装

NodeJS提供了一些安装程序,都可以在nodejs.org 这里下载并安装。mac系统选择.pkg结尾的文件下载安装。 注意node版本号过高可能导致 npm install 时失败,建议版本:

  • node:v8.16.0
  • npm:6.4.1

安装依赖

yarn

npm install

启动

yarn start

npm start

构建打包

yarn build

npm run build

代理配置

build/webpack.dev.conf.js 修改proxy属性

proxy: [{
  context: ['/'],
  changeOrigin: true,
  secure: false,
  target: 'http://ip:port',
}],