Docker build: Pre-compile public libraries
| @@ -27,6 +27,11 @@ RUN \ | |||
| 27 | ln -s "./config/config.yaml" "config.yaml" || true && \ | 27 | ln -s "./config/config.yaml" "config.yaml" || true && \ |
| 28 | mkdir "config" || true | 28 | mkdir "config" || true |
| 29 | 29 | ||
| 30 | # Pre-compile public libraries | ||
| 31 | RUN \ | ||
| 32 | echo "*** Run Webpack ***" && \ | ||
| 33 | node "./docker/build-lib.js" | ||
| 34 | |||
| 30 | # Cleanup unnecessary files | 35 | # Cleanup unnecessary files |
| 31 | RUN \ | 36 | RUN \ |
| 32 | echo "*** Cleanup ***" && \ | 37 | echo "*** Cleanup ***" && \ |
| @@ -0,0 +1,4 @@ | |||
| 1 | import getWebpackServeMiddleware from '../src/middleware/webpack-serve.js'; | ||
| 2 | |||
| 3 | const middleware = getWebpackServeMiddleware(); | ||
| 4 | await middleware.runWebpackCompiler(); | ||
| @@ -36,7 +36,9 @@ export default function getWebpackServeMiddleware() { | |||
| 36 | console.log(output); | 36 | console.log(output); |
| 37 | console.log(); | 37 | console.log(); |
| 38 | } | 38 | } |
| 39 | resolve(); | 39 | compiler.close(() => { |
| 40 | resolve(); | ||
| 41 | }); | ||
| 40 | }); | 42 | }); |
| 41 | }); | 43 | }); |
| 42 | }; | 44 | }; |