mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Docker build: Pre-compile public libraries
This commit is contained in:
@@ -27,6 +27,11 @@ RUN \
|
||||
ln -s "./config/config.yaml" "config.yaml" || true && \
|
||||
mkdir "config" || true
|
||||
|
||||
# Pre-compile public libraries
|
||||
RUN \
|
||||
echo "*** Run Webpack ***" && \
|
||||
node "./docker/build-lib.js"
|
||||
|
||||
# Cleanup unnecessary files
|
||||
RUN \
|
||||
echo "*** Cleanup ***" && \
|
||||
|
4
docker/build-lib.js
Normal file
4
docker/build-lib.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import getWebpackServeMiddleware from '../src/middleware/webpack-serve.js';
|
||||
|
||||
const middleware = getWebpackServeMiddleware();
|
||||
await middleware.runWebpackCompiler();
|
@@ -36,9 +36,11 @@ export default function getWebpackServeMiddleware() {
|
||||
console.log(output);
|
||||
console.log();
|
||||
}
|
||||
compiler.close(() => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
return devMiddleware;
|
||||
|
Reference in New Issue
Block a user