Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@gmail.com>2019-03-02 01:50:31 +0300
committerXhmikosR <xhmikosr@gmail.com>2019-03-11 18:59:08 +0300
commite8684b55b8622473eca18b89d52cd1bc38bc7ef2 (patch)
tree8158b0908ab51883f3a3527e9d81a5aaf4519303 /build
parent41f72d3d5f38054479cbfbfbe00e544dc855c4ca (diff)
Tweak rollup.config.js
Diffstat (limited to 'build')
-rw-r--r--build/rollup.config.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/build/rollup.config.js b/build/rollup.config.js
index 9475844c92..e04e9d8047 100644
--- a/build/rollup.config.js
+++ b/build/rollup.config.js
@@ -8,8 +8,7 @@ const banner = require('./banner.js')
const BUNDLE = process.env.BUNDLE === 'true'
const ESM = process.env.ESM === 'true'
-let fileDest = `bootstrap${ESM ? '.esm' : ''}.js`
-const indexPath = ESM ? '../js/index.esm.js' : '../js/index.umd.js'
+let fileDest = `bootstrap${ESM ? '.esm' : ''}`
const external = ['popper.js']
const plugins = [
babel({
@@ -30,7 +29,7 @@ const globals = {
}
if (BUNDLE) {
- fileDest = `bootstrap${ESM ? '.esm' : ''}.bundle.js`
+ fileDest += '.bundle'
// Remove last entry in external array to bundle Popper
external.pop()
delete globals['popper.js']
@@ -38,10 +37,10 @@ if (BUNDLE) {
}
const rollupConfig = {
- input: path.resolve(__dirname, indexPath),
+ input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`),
output: {
banner,
- file: path.resolve(__dirname, `../dist/js/${fileDest}`),
+ file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
format: ESM ? 'esm' : 'umd',
globals
},