feature: chained html and pug loader to support parameter injection

webpushnotifications
plup 4 years ago
parent 3a321c2b00
commit 3cb7dbeeb1

1
.gitignore vendored

@ -2,3 +2,4 @@
/src/config.json
*.iml
*.swp
dist

7570
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -9,16 +9,17 @@
"dependencies": {
"@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",
"file-loader": "^4.2.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"mini-css-extract-plugin": "^0.8.0",
"node-sass": "^4.13.0",
"pug": "^2.0.4",
"pug-html-loader": "^1.1.5",
"sass-loader": "^8.0.0",
"mini-css-extract-plugin": "^0.8.0",
"file-loader": "^4.2.0"
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.9.0"
}
}

@ -22,7 +22,27 @@ const config = {
rules: [
{
test: /\.pug$/,
use: "pug-loader"
use: [
{ loader: "html-loader" },
{ loader: "pug-html-loader",
options: {
data: {
cdn: "https://cdn.happy-dev.fr",
xmpp: "https://jabber.happy-dev.fr/http-bind/",
authority: "http://127.0.0.1:8000/openid/",
endpoints: {
businessproviders: "http://127.0.0.1:8000/businessproviders/",
circles: "http://127.0.0.1:8000/circles/",
groups: "http://127.0.0.1:8000/groups/",
joboffers: "http://127.0.0.1:8000/job-offers/",
projects: "http://127.0.0.1:8000/projects/",
skills: "http://127.0.0.1:8000/skills/",
users: "http://127.0.0.1:8000/users/"
}
}
}
}
]
},
{
test: /\.js$/,

Loading…
Cancel
Save