首页 > 解决方案 > 问:如何加快流星构建/安装包的速度?

问题描述

我对 Meteor 很陌生,所以不确定我可以提供什么信息来帮助你们理解问题所在。但是每次我尝试运行我的流星应用程序时,或者每当我添加一个包/库等时,构建和包安装都需要很长时间 - 最多 10 分钟。我真的不知道为什么会这样,但这非常令人沮丧,我最终在等待的时候分心了。

我使用的流星版本是@1.7.0.4

流星包:

meteor-base@1.4.0             # Packages every Meteor app needs to have
mobile-experience@1.0.5       # Packages for a great mobile UX
mongo@1.5.0                   # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze 
views
reactive-var@1.0.11            # Reactive variable for tracker
tracker@1.2.0                 # Meteor's client-side reactive 
programming library

standard-minifier-css@1.4.1   # CSS minifier run for production mode
standard-minifier-js@2.3.4    # JS minifier run for production mode
es5-shim@4.8.0                # ECMAScript 5 compatibility for older 
browsers
ecmascript@0.11.1              # Enable ECMAScript2015+ syntax in app 
code
shell-server@0.3.1            # Server-side component of the `meteor 
shell` command

insecure@1.0.7                # Allow all DB writes from clients (for 
prototyping)
materialize:materialize
aldeed:collection2-core
momentjs:moment
aldeed:autoform

Packages.json:

{
  "name": "hotel",
  "private": true,
  "scripts": {
    "start": "meteor run",
    "lint": "eslint .",
    "pretest": "run lint --silent",
    "test": "meteor test --once --driver-package meteortesting:mocha",
    "test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
    "visualize": "meteor --production --extra-packages bundle-visualizer"
  },
  "eslintConfig": {
    "extends": "@meteorjs/eslint-config-meteor"
  },
  "dependencies": {
    "@babel/runtime": "7.0.0-beta.55",
    "@meteorjs/eslint-config-meteor": "^1.0.5",
    "babel-eslint": "^8.2.6",
    "eslint": "^5.3.0",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-import-resolver-meteor": "^0.4.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.1",
    "eslint-plugin-meteor": "^5.0.0",
    "eslint-plugin-react": "^7.11.0",
    "faker": "^4.1.0",
    "lodash": "^4.17.10",
    "meteor-node-stubs": "^0.4.1",
    "simpl-schema": "^1.5.3"
  },
  "meteor": {
    "mainModule": {
      "client": "client/main.js",
      "server": "server/main.js"
    },
    "testModule": "tests/main.js"
  }
}

标签: meteor

解决方案


推荐阅读