Commit 4c6ccb49 authored by Aljaž Srebrnič's avatar Aljaž Srebrnič

Apparently, expose-loader is needed for jQuery

Apparently, jQuery is not exposed by default, so that is needed to add
jQuery by defaults to all files using it.
parent 320b0912
......@@ -1889,6 +1889,12 @@
}
}
},
"expose-loader": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/expose-loader/-/expose-loader-0.7.5.tgz",
"integrity": "sha512-iPowgKUZkTPX5PznYsmifVj9Bob0w2wTHVkt/eYNPSzyebkUgIedmskf/kcfEIWpiWjg3JRjnW+a17XypySMuw==",
"dev": true
},
"express": {
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
......
......@@ -16,6 +16,7 @@
"autoprefixer": "^9.3.1",
"bootstrap": "^4.1.3",
"css-loader": "^1.0.1",
"expose-loader": "^0.7.5",
"jquery": "^3.3.1",
"mini-css-extract-plugin": "^0.4.4",
"node-sass": "^4.9.4",
......
......@@ -34,6 +34,15 @@ module.exports = {
}, {
loader: 'sass-loader' // compiles Sass to CSS
}]
}, {
test: require.resolve('jquery'),
use: [{
loader: 'expose-loader',
options: 'jQuery'
}, {
loader: 'expose-loader',
options: '$'
}]
}
]},
plugins: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment