File: build-js-using-buble-instead-of-babel.patch

package info (click to toggle)
twitter-bootstrap4 4.3.1%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,716 kB
  • sloc: sh: 35; makefile: 20; xml: 11
file content (76 lines) | stat: -rw-r--r-- 2,077 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Description: babel 6 does not work, but buble does, so switch to it
Forwarded: not-needed
Last-Update: 2019-01-31
Author: Jérémy Lal <kapouer@melix.org>
--- a/build/rollup.config.js
+++ b/build/rollup.config.js
@@ -1,7 +1,7 @@
 'use strict'
 
 const path    = require('path')
-const babel   = require('rollup-plugin-babel')
+const buble   = require('rollup-plugin-buble')
 const resolve = require('rollup-plugin-node-resolve')
 const banner  = require('./banner.js')
 
@@ -10,15 +10,16 @@
 let fileDest  = 'bootstrap.js'
 const external = ['jquery', 'popper.js']
 const plugins = [
-  babel({
+  buble({
     exclude: 'node_modules/**', // Only transpile our source code
-    externalHelpersWhitelist: [ // Include only required helpers
+    objectAssign: 'Object.assign',
+    /*externalHelpersWhitelist: [ // Include only required helpers
       'defineProperties',
       'createClass',
       'inheritsLoose',
       'defineProperty',
       'objectSpread'
-    ]
+    ]*/
   })
 ]
 const globals = {
@@ -31,7 +32,11 @@
   // Remove last entry in external array to bundle Popper
   external.pop()
   delete globals['popper.js']
-  plugins.push(resolve())
+  plugins.unshift(resolve({
+    customResolveOptions: {
+      moduleDirectory: '/usr/lib/nodejs'
+    }
+  }))
 }
 
 module.exports = {
--- a/build/build-plugins.js
+++ b/build/build-plugins.js
@@ -9,20 +9,21 @@
 
 const path    = require('path')
 const rollup  = require('rollup')
-const babel   = require('rollup-plugin-babel')
+const buble   = require('rollup-plugin-buble')
 const banner  = require('./banner.js')
 
 const TEST    = process.env.NODE_ENV === 'test'
 const plugins = [
-  babel({
+  buble({
     exclude: 'node_modules/**', // Only transpile our source code
-    externalHelpersWhitelist: [ // Include only required helpers
+    objectAssign: 'Object.assign',
+    /*externalHelpersWhitelist: [ // Include only required helpers
       'defineProperties',
       'createClass',
       'inheritsLoose',
       'defineProperty',
       'objectSpread'
-    ]
+    ]*/
   })
 ]
 const bsPlugins = {