Skip to content

Commit e392885

Browse files
committed
fix: support IE10~11 #104
1 parent c727b3e commit e392885

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

β€Žbabel.config.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
module.exports = {
22
presets: [
3-
'@vue/app'
3+
'@vue/app',
4+
[
5+
'@babel/preset-env',
6+
{
7+
'useBuiltIns': 'entry'
8+
}
9+
]
410
]
11+
// if your use import on Demand, Use this code
512
// ,
613
// plugins: [
714
// [ 'import', {

β€Žpackage.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"vuex": "^3.1.0"
3030
},
3131
"devDependencies": {
32+
"@babel/polyfill": "^7.2.5",
3233
"@vue/cli-plugin-babel": "^3.3.0",
3334
"@vue/cli-plugin-eslint": "^3.3.0",
3435
"@vue/cli-plugin-unit-jest": "^3.3.0",
@@ -116,6 +117,6 @@
116117
"browserslist": [
117118
"> 1%",
118119
"last 2 versions",
119-
"not ie <= 8"
120+
"not ie <= 10"
120121
]
121122
}

β€Žsrc/main.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import '@babel/polyfill'
12
import Vue from 'vue'
23
import App from './App.vue'
34
import router from './router'

β€Žvue.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,7 @@ module.exports = {
104104
}
105105
},
106106

107-
lintOnSave: undefined
107+
lintOnSave: undefined,
108+
// babel-loader no-ignore node_modules/*
109+
transpileDependencies: []
108110
}

β€Žyarn.lock

+8
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,14 @@
701701
"@babel/helper-regex" "^7.0.0"
702702
regexpu-core "^4.1.3"
703703

704+
"@babel/polyfill@^7.2.5":
705+
version "7.2.5"
706+
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.2.5.tgz#6c54b964f71ad27edddc567d065e57e87ed7fa7d"
707+
integrity sha512-8Y/t3MWThtMLYr0YNC/Q76tqN1w30+b0uQMeFUYauG2UGTR19zyUtFrAzT23zNtBxPp+LbE5E/nwV/q/r3y6ug==
708+
dependencies:
709+
core-js "^2.5.7"
710+
regenerator-runtime "^0.12.0"
711+
704712
"@babel/preset-env@^7.0.0", "@babel/preset-env@^7.1.0":
705713
version "7.3.4"
706714
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.3.4.tgz#887cf38b6d23c82f19b5135298bdb160062e33e1"

0 commit comments

Comments
Β (0)