修复Docker构建:npm install + 修复webpack ProgressPlugin兼容性
This commit is contained in:
parent
8adcfce2c8
commit
68b20ab6be
|
|
@ -6,6 +6,9 @@ WORKDIR /gitlink_help_center
|
|||
COPY ./ /gitlink_help_center/
|
||||
|
||||
RUN npm install --legacy-peer-deps
|
||||
|
||||
RUN node -e "const fs=require('fs');['node_modules/@docusaurus/bundler/lib/compiler.js','node_modules/@docusaurus/bundler/lib/webpack/utils.js'].forEach(f=>{try{let c=fs.readFileSync(f,'utf8');c=c.replace(/new\s+\w*\.?ProgressPlugin\(\s*\{[\s\S]*?\}\s*\)/g,'new webpack.ProgressPlugin()');fs.writeFileSync(f,c)}catch(e){}})"
|
||||
|
||||
ENV CI=true
|
||||
RUN npm run build -- --locale zh-cn
|
||||
CMD ["npm", "run", "serve"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue