Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Commit e92672e

Browse files
committed
fix: Build issues, ref (#35), (#36)
- Dependencies updated - Eslint fixes - Build fixes
1 parent 1be5264 commit e92672e

File tree

8 files changed

+890
-361
lines changed

8 files changed

+890
-361
lines changed

.browserslistrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

build/rollup.config.js

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// rollup.config.js
2-
import fs from 'fs';
31
import vue from 'rollup-plugin-vue';
42
import commonjs from '@rollup/plugin-commonjs';
53
import resolve from '@rollup/plugin-node-resolve';
@@ -9,16 +7,6 @@ import PostCSS from 'rollup-plugin-postcss';
97
import { terser } from 'rollup-plugin-terser';
108
import minimist from 'minimist';
119

12-
// Get browserslist config and remove ie from es build targets
13-
const esbrowserslist = fs
14-
.readFileSync('./.browserslistrc')
15-
.toString()
16-
.split('\n')
17-
.filter((entry) => entry && entry.substring(0, 2) !== 'ie');
18-
19-
// Extract babel preset-env config, to combine with esbrowserslist
20-
const babelPresetEnvConfig = {};
21-
2210
const argv = minimist(process.argv.slice(2));
2311

2412
const baseConfig = {
@@ -47,7 +35,6 @@ const baseConfig = {
4735
babel: {
4836
exclude: 'node_modules/**',
4937
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'],
50-
babelHelpers: 'bundled',
5138
},
5239
},
5340
};
@@ -72,20 +59,13 @@ if (!argv.format || argv.format === 'es') {
7259
},
7360
plugins: [
7461
replace(baseConfig.plugins.replace),
75-
// ...baseConfig.plugins.preVue,
7662
vue(baseConfig.plugins.vue),
7763
...baseConfig.plugins.postVue,
7864
babel({
7965
...baseConfig.plugins.babel,
80-
presets: [
81-
[
82-
'@babel/preset-env',
83-
{
84-
...babelPresetEnvConfig,
85-
targets: esbrowserslist,
86-
},
87-
],
88-
],
66+
babelHelpers: 'runtime',
67+
plugins: ['@babel/plugin-transform-runtime'],
68+
presets: [['@babel/preset-env']],
8969
}),
9070
terser({
9171
output: {
@@ -114,7 +94,7 @@ if (!argv.format || argv.format === 'cjs') {
11494
// ...baseConfig.plugins.preVue,
11595
vue(baseConfig.plugins.vue),
11696
...baseConfig.plugins.postVue,
117-
babel(baseConfig.plugins.babel),
97+
babel({ ...baseConfig.plugins.babel, babelHelpers: 'bundled' }),
11898
terser({
11999
output: {
120100
ecma: 5,
@@ -142,7 +122,7 @@ if (!argv.format || argv.format === 'iife') {
142122
// ...baseConfig.plugins.preVue,
143123
vue(baseConfig.plugins.vue),
144124
...baseConfig.plugins.postVue,
145-
babel(baseConfig.plugins.babel),
125+
babel({ ...baseConfig.plugins.babel, babelHelpers: 'bundled' }),
146126
terser({
147127
output: {
148128
ecma: 5,

0 commit comments

Comments
 (0)