Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 281ab36

Browse files
author
Steffan
committed
use rollup-babel-plugin
1 parent 99e9b39 commit 281ab36

File tree

3 files changed

+14
-28
lines changed

3 files changed

+14
-28
lines changed

build/build.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const zlib = require('zlib');
55
const rollup = require('rollup');
66
const uglify = require('uglify-js');
77
const vue = require('rollup-plugin-vue');
8-
const buble = require('rollup-plugin-buble');
8+
const babel = require('rollup-plugin-babel');
99
const replace = require('rollup-plugin-replace');
1010
const {name, version, homepage} = require('../package.json');
1111
const banner =
@@ -17,7 +17,11 @@ const banner =
1717

1818
rollup.rollup({
1919
input: 'src/index.js',
20-
plugins: [vue(), buble(), replace({__VERSION__: version})]
20+
plugins: [
21+
vue(),
22+
babel({extensions: ['.js', '.vue']}),
23+
replace({__VERSION__: version})
24+
]
2125
})
2226
.then(bundle =>
2327
bundle.generate({

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@
3535
"@storybook/vue": "^4.1.4",
3636
"babel-loader": "^8.0.4",
3737
"babel-preset-vue": "^2.0.2",
38-
"buble": "^0.19.6",
3938
"eslint": "^5.11.0",
4039
"eslint-plugin-vue": "^4.7.0",
4140
"replace-in-file": "^3.1.1",
4241
"rollup": "^0.68.2",
43-
"rollup-plugin-buble": "^0.19.6",
42+
"rollup-plugin-babel": "^4.1.0",
4443
"rollup-plugin-replace": "^2.0.0",
4544
"rollup-plugin-vue": "^3.0.0",
4645
"uglify-js": "^3.4.9",

yarn.lock

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,18 +2191,6 @@ browserslist@^4.3.4:
21912191
electron-to-chromium "^1.3.86"
21922192
node-releases "^1.0.5"
21932193

2194-
buble@^0.19.6:
2195-
version "0.19.6"
2196-
resolved "https://registry.yarnpkg.com/buble/-/buble-0.19.6.tgz#915909b6bd5b11ee03b1c885ec914a8b974d34d3"
2197-
integrity sha512-9kViM6nJA1Q548Jrd06x0geh+BG2ru2+RMDkIHHgJY/8AcyCs34lTHwra9BX7YdPrZXd5aarkpr/SY8bmPgPdg==
2198-
dependencies:
2199-
chalk "^2.4.1"
2200-
magic-string "^0.25.1"
2201-
minimist "^1.2.0"
2202-
os-homedir "^1.0.1"
2203-
regexpu-core "^4.2.0"
2204-
vlq "^1.0.0"
2205-
22062194
buffer-from@^1.0.0:
22072195
version "1.1.1"
22082196
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
@@ -7508,13 +7496,13 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
75087496
hash-base "^3.0.0"
75097497
inherits "^2.0.1"
75107498

7511-
rollup-plugin-buble@^0.19.6:
7512-
version "0.19.6"
7513-
resolved "https://registry.yarnpkg.com/rollup-plugin-buble/-/rollup-plugin-buble-0.19.6.tgz#55ee0995d8870d536f01f4277c3eef4276e8747e"
7514-
integrity sha512-El5Fut4/wEO17ZN/n9BZvqd7DXXB2WbJr/DKvr89LXChC/cHllE0XwiUDeAalrTkgr0WrnyLDTCQvEv+cGywWQ==
7499+
rollup-plugin-babel@^4.1.0:
7500+
version "4.1.0"
7501+
resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.1.0.tgz#c97f50c82aa8e89ddaa116cdc5c832b8ba74db17"
7502+
integrity sha512-4IYv/yTNyH4P/Cma1mWdqy42gc051i1mTe/6oe8F055WzJGSb2qs1mSDwZTo93wA6kMBgHBIR/OcBk7JMnL59Q==
75157503
dependencies:
7516-
buble "^0.19.6"
7517-
rollup-pluginutils "^2.3.3"
7504+
"@babel/helper-module-imports" "^7.0.0"
7505+
rollup-pluginutils "^2.3.0"
75187506

75197507
rollup-plugin-replace@^2.0.0:
75207508
version "2.1.0"
@@ -7557,7 +7545,7 @@ rollup-plugin-vue@^3.0.0:
75577545
pug "^2.0.0-beta11"
75587546
stylus "^0.54.5"
75597547

7560-
rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.3:
7548+
rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.0:
75617549
version "2.3.3"
75627550
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz#3aad9b1eb3e7fe8262820818840bf091e5ae6794"
75637551
integrity sha512-2XZwja7b6P5q4RZ5FhyX1+f46xi1Z3qBKigLRZ6VTZjwbN0K1IFGMlwm06Uu0Emcre2Z63l77nq/pzn+KxIEoA==
@@ -8685,11 +8673,6 @@ vlq@^0.2.2:
86858673
resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"
86868674
integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==
86878675

8688-
vlq@^1.0.0:
8689-
version "1.0.0"
8690-
resolved "https://registry.yarnpkg.com/vlq/-/vlq-1.0.0.tgz#8101be90843422954c2b13eb27f2f3122bdcc806"
8691-
integrity sha512-o3WmXySo+oI5thgqr7Qy8uBkT/v9Zr+sRyrh1lr8aWPUkgDWdWt4Nae2WKBrLsocgE8BuWWD0jLc+VW8LeU+2g==
8692-
86938676
vm-browserify@0.0.4:
86948677
version "0.0.4"
86958678
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"

0 commit comments

Comments
 (0)