Skip to content
Snippets Groups Projects
Commit 3a321c2b authored by plup's avatar plup
Browse files

feature: imported webpack template

parent 401a000e
No related branches found
No related tags found
1 merge request!74Deploy sibapp with managers
Showing
with 17 additions and 4607 deletions
/node_modules
/src/config.json
/www/index.html
/www/index.*.html
/www/styles/
/www/scripts/
/www/lib/
/www/oidc-client-config.json
*.iml
\ No newline at end of file
*.iml
*.swp
This diff is collapsed.
......@@ -3,17 +3,22 @@
"version": "1.0.0",
"license": "MIT",
"scripts": {
"serve": "node server.js"
},
"devDependencies": {
"@babel/core": "^7.4.4",
"@babel/cli": "^7.4.4",
"node-sass": "^4.12.0",
"pug-cli": "^1.0.0-alpha6",
"express": "^4.16.4"
"build": "webpack --mode=production",
"serve": "webpack-dev-server --port 3000 --hot --host 0.0.0.0 --mode=development"
},
"dependencies": {
"include-media": "^1.4.9",
"normalize.css": "^8.0.1"
"@babel/core": "^7.6.4",
"babel-loader": "^8.0.6",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.9.0",
"html-webpack-plugin": "^3.2.0",
"pug": "^2.0.4",
"pug-loader": "^2.4.0",
"css-loader": "^3.2.0",
"node-sass": "^4.13.0",
"sass-loader": "^8.0.0",
"mini-css-extract-plugin": "^0.8.0",
"file-loader": "^4.2.0"
}
}
const port = 3000;
const distPath = 'www';
// express server
const { join } = require('path');
const express = require('express');
const app = express();
app
.use(express.static(distPath))
.get(/^[^.]*$/, (req, rep) => rep.sendFile(join(__dirname, distPath, '/index.html')))
.listen(port);
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment