我使用以下使用 webpack 的项目 https://github.com/Hashnode/mern-starter
我想部署它(到 prod)我得到错误
错误:找不到模块 './dist/manifest.json' 此错误来自https://github.com/Hashnode/mern-starter/blob/master/index.js
但是我在项目中没有看到 dist 文件夹,为什么以及如何构建它?
我相信 Dist 文件夹应该在构建时创建(manification 等)所以我应该如何触发它 ?
这是 package.json
{
"name": "mern-starter",
"version": "2.0.0",
"description": "Boilerplate project for building Isomorphic apps using React and Redux",
"scripts": {
"test": "cross-env NODE_ENV=test PORT=8080 MONGO_URL=mongodb://localhost:27017/mern-test node_modules/.bin/nyc node --harmony-proxies node_modules/.bin/ava",
"watch:test": "npm run test -- --watch",
"cover": "nyc npm run test",
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
"start": "cross-env BABEL_DISABLE_CACHE=1 NODE_ENV=development nodemon index.js",
"start:prod": "cross-env NODE_ENV=production node index.js",
"bs": "npm run clean && npm run build && npm run build:server && npm run start:prod",
"build": "cross-env NODE_ENV=production webpack --config webpack.config.prod.js",
"build:server": "cross-env NODE_ENV=production webpack --config webpack.config.server.js",
"clean": "rimraf dist",
"slate": "rimraf node_modules && npm install",
"lint": "eslint client server"
},
我认为 start:prod 应该在 webpack 中触发它,但它没有发生......任何想法?