Skip to content

Commit 8934c01

Browse files
committed
chore: 使用 rollup 官方 babel 插件进行构建
1 parent 39c040f commit 8934c01

File tree

6 files changed

+56
-45
lines changed

6 files changed

+56
-45
lines changed

.babelrc

-15
This file was deleted.

babel.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
modules: false,
7+
},
8+
],
9+
],
10+
}

build/rollup.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'path'
2-
import babel from 'rollup-plugin-babel'
2+
import babel from '@rollup/plugin-babel'
33

44
const inputPath = path.resolve(__dirname, '../src/index.js')
55
const umdOutputPath = path.resolve(__dirname, '../dist/vue3-highlight.js')

build/rollup.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'path'
2-
import babel from 'rollup-plugin-babel'
2+
import babel from '@rollup/plugin-babel'
33
import { terser } from 'rollup-plugin-terser'
44

55
const inputPath = path.resolve(__dirname, '../src/index.js')

package-lock.json

+42-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue3-highlightjs",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Syntax highlighting with highlight.js for Vue.js 3.x",
55
"main": "dist/vue3-highlight.js",
66
"module": "dist/vue3-highlight-es.js",
@@ -34,10 +34,10 @@
3434
"devDependencies": {
3535
"@babel/core": "^7.12.3",
3636
"@babel/preset-env": "^7.12.1",
37+
"@rollup/plugin-babel": "^5.2.1",
3738
"prettier": "^2.1.2",
3839
"rimraf": "^3.0.2",
3940
"rollup": "^2.33.1",
40-
"rollup-plugin-babel": "^4.4.0",
4141
"rollup-plugin-terser": "^7.0.2"
4242
},
4343
"peerDependencies": {

0 commit comments

Comments
 (0)