Commit 897d3af2 authored by GriZmio's avatar GriZmio Committed by GitHub

Allow ignore bootstrap modules at build (#1852)

* This allow you to ignore some bootstrap modules you have already included/imported
to your project. Fix error: In a webpage you are already using bootstrap and have
a dropdown, but you have to click twice to make it work, because conversejs added
another handler.

* Add:
   - Allow ignoring bootstrap modules using environment variable: BOOTSTRAP_IGNORE_MODULES="Modal,Dropdown".
     Example: export BOOTSTRAP_IGNORE_MODULES="Modal,Dropdown" ; make dist
parent 5edb62c3
......@@ -14,6 +14,8 @@
and [muc_roomid_policy_hint](https://conversejs.org/docs/html/configuration.html#muc-roomid-policy-hint)
- #1826: A user can now add himself as a contact
- #1839: Headline messages are shown in controlbox
- Allow ignore bootstrap modules at build using environment variable: BOOTSTRAP_IGNORE_MODULES="Modal,Dropdown".
example: export BOOTSTRAP_IGNORE_MODULES="Modal,Dropdown" && make dist
## 6.0.0 (2020-01-09)
......
/* global __dirname, module */
const path = require('path');
bootstrap_ignore_modules = ['carousel', 'scrollspy'];
BOOTSTRAP_IGNORE_MODULES = (process.env.BOOTSTRAP_IGNORE_MODULES || '').replace(/ /g, '').trim();
if(BOOTSTRAP_IGNORE_MODULES.length > 0)
bootstrap_ignore_modules = bootstrap_ignore_modules.concat(BOOTSTRAP_IGNORE_MODULES.split(','));
module.exports = {
output: {
path: path.resolve(__dirname, 'dist'), // Output path for generated bundles
......@@ -103,7 +109,7 @@ module.exports = {
loader: 'bootstrap.native-loader',
options: {
bs_version: 4,
ignore: ['carousel', 'scrollspy']
ignore: bootstrap_ignore_modules
}
}
}],
......
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