aboutsummaryrefslogtreecommitdiff
path: root/build/rollup.config.js
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-08-16 20:47:33 -0400
committerGitHub <[email protected]>2024-08-16 20:47:33 -0400
commit6b28433d9cfde435be8ec2bd6cf91e6324d08865 (patch)
tree8343c27b8b95ff5639233e81cf157f92e5688466 /build/rollup.config.js
parentd53094ec16ba385faae2973ddee648698b32ab24 (diff)
parent048f56f51460df75e92a2f7b472e1c56baeb68f7 (diff)
downloadbootstrap-main.tar.xz
bootstrap-main.zip
Merge branch 'twbs:main' into mainHEADmain
Diffstat (limited to 'build/rollup.config.js')
-rw-r--r--build/rollup.config.js57
1 files changed, 0 insertions, 57 deletions
diff --git a/build/rollup.config.js b/build/rollup.config.js
deleted file mode 100644
index c00438de2..000000000
--- a/build/rollup.config.js
+++ /dev/null
@@ -1,57 +0,0 @@
-'use strict'
-
-const path = require('path')
-const { babel } = require('@rollup/plugin-babel')
-const { nodeResolve } = require('@rollup/plugin-node-resolve')
-const replace = require('@rollup/plugin-replace')
-const banner = require('./banner.js')
-
-const BUNDLE = process.env.BUNDLE === 'true'
-const ESM = process.env.ESM === 'true'
-
-let fileDest = `bootstrap${ESM ? '.esm' : ''}`
-const external = ['@popperjs/core']
-const plugins = [
- babel({
- // Only transpile our source code
- exclude: 'node_modules/**',
- // Include the helpers in the bundle, at most one copy of each
- babelHelpers: 'bundled'
- })
-]
-const globals = {
- '@popperjs/core': 'Popper'
-}
-
-if (BUNDLE) {
- fileDest += '.bundle'
- // Remove last entry in external array to bundle Popper
- external.pop()
- delete globals['@popperjs/core']
- plugins.push(
- replace({
- 'process.env.NODE_ENV': '"production"',
- preventAssignment: true
- }),
- nodeResolve()
- )
-}
-
-const rollupConfig = {
- input: path.resolve(__dirname, `../js/index.${ESM ? 'esm' : 'umd'}.js`),
- output: {
- banner,
- file: path.resolve(__dirname, `../dist/js/${fileDest}.js`),
- format: ESM ? 'esm' : 'umd',
- globals,
- generatedCode: 'es2015'
- },
- external,
- plugins
-}
-
-if (!ESM) {
- rollupConfig.output.name = 'bootstrap'
-}
-
-module.exports = rollupConfig