Skip to content
Snippets Groups Projects
Verified Commit b3daef7f authored by David Beniamine's avatar David Beniamine
Browse files

WIP trying to run build_deps on webpack shell script

parent 094248ef
No related branches found
No related tags found
No related merge requests found
......@@ -5,4 +5,4 @@ RUN chown node:node /opt
EXPOSE 9000
WORKDIR /opt
USER node
CMD npm run serve
CMD npm install && npm run serve
......@@ -13,7 +13,6 @@ run_on_modules(){
done
}
echo "Installing dependencies"
npm install
echo "Compiling submodules"
run_on_modules build
......@@ -22,7 +22,8 @@
"devDependencies": {
"webpack": "^4.43.0",
"webpack-cli": "^4.3.12",
"webpack-dev-server": "^4.11.1"
"webpack-dev-server": "^4.11.1",
"webpack-shell-plugin": "^0.5.0"
}
},
"annotations-plugin": {
......@@ -24916,6 +24917,12 @@
"node": ">=10.0.0"
}
},
"node_modules/webpack-shell-plugin": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/webpack-shell-plugin/-/webpack-shell-plugin-0.5.0.tgz",
"integrity": "sha512-BJMcVgXzA7Yc/Dq9JFj/wvquYG5qP3lgmCpMYzhP1a+LxZ/z3TbqKJ3W2xTkzQqBeYsgTdOcSdZ/+qYoFBhMhA==",
"dev": true
},
"node_modules/webpack-sources": {
"version": "1.4.3",
"license": "MIT",
......@@ -42373,6 +42380,12 @@
"wildcard": "^2.0.0"
}
},
"webpack-shell-plugin": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/webpack-shell-plugin/-/webpack-shell-plugin-0.5.0.tgz",
"integrity": "sha512-BJMcVgXzA7Yc/Dq9JFj/wvquYG5qP3lgmCpMYzhP1a+LxZ/z3TbqKJ3W2xTkzQqBeYsgTdOcSdZ/+qYoFBhMhA==",
"dev": true
},
"webpack-sources": {
"version": "1.4.3",
"requires": {
......@@ -4,7 +4,6 @@
"description": "",
"private": true,
"scripts": {
"prebuild": "./build_deps.sh",
"build": "webpack --config webpack.config.js",
"preserve": "npm run build",
"serve": "webpack serve --config webpack.config.js"
......@@ -25,6 +24,7 @@
"devDependencies": {
"webpack": "^4.43.0",
"webpack-cli": "^4.3.12",
"webpack-dev-server": "^4.11.1"
"webpack-dev-server": "^4.11.1",
"webpack-shell-plugin": "^0.5.0"
}
}
const path = require('path');
const webpack = require('webpack');
const Dotenv = require('dotenv-webpack');
const WebpackShellPlugin = require('webpack-shell-plugin');
module.exports = {
mode: process.env.WEBPACK_MODE,
......@@ -38,6 +39,9 @@ module.exports = {
/* cf https://gitlab.tetras-libre.fr/iiif/mirador-video-annotation/-/blob/annotation-on-video/webpack.config.js#L42 */
resourceRegExp: /@blueprintjs\/(core|icons)/, // ignore optional UI framework dependencies
}),
new WebpackShellPlugin({
onBuildStart:['./build_deps.sh']
}),
new Dotenv()
]
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment