Tag: webpack yarnpkg

Docker容器中的NodeJS webpack构build

我阅读了关于长期caching的内容,并试图在我的项目中实现这一点,但是当我试图在Docker容器中构build它时,清单文件会生成错误的资源链接,但是生成过程却很顺利。 Dockerfile.web FROM node:8.2.1-alpine WORKDIR /web ADD /tmp/app.tar.gz /web # At the end node_modules will be removed because of bug with npm prune. # In this case we need re-install production-only deps to reduce container weight. RUN yarn install && \ yarn run build-production && \ rm -rf node_modules && \ yarn install –production && […]