diff --git a/babel.config.json b/babel.config.json new file mode 100644 index 0000000..6425b3c --- /dev/null +++ b/babel.config.json @@ -0,0 +1,11 @@ +{ + "plugins": ["@babel/plugin-transform-runtime"], + "presets": [ + [ + "@babel/preset-env", + { + "useBuiltIns": "usage" + } + ] + ] +} diff --git a/package.json b/package.json index 367604f..9ebc617 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,15 @@ { "browserslist": [ - "last 1 Chrome versions", - "last 1 Firefox versions" + "defaults", + "ios 9.3" ], "scripts": { "start": "parcel src/index.html" }, "devDependencies": { + "@babel/core": "^7.8.7", + "@babel/plugin-transform-runtime": "^7.8.3", + "@babel/preset-env": "^7.8.7", "@vue/component-compiler-utils": "^3.0.0", "sass": "^1.23.1", "typescript": "^3.6.4", @@ -17,7 +20,9 @@ "@fullcalendar/google-calendar": "^4.3.0", "@fullcalendar/timegrid": "^4.3.0", "@fullcalendar/vue": "^4.3.1", + "core-js": "^3.6.4", "equicolor": "^1.1.0", + "intl": "^1.2.5", "vue": "^2.6.10", "vue-hot-reload-api": "^2.3.4", "vue-property-decorator": "^8.3.0" diff --git a/src/index.ts b/src/index.ts index 844b31f..c7fd46c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,14 @@ +import 'core-js/modules/es.object.entries'; + +// TODO: could probably be a dynamic import +import intl from 'intl'; +import 'intl/locale-data/jsonp/en.js'; + +if (!window.Intl) { + // No `Intl`, so use and load the polyfill. + window.Intl = intl; +} + import Vue from 'vue'; import App from './App';