Replace ts-loader with Babel (#21587)

* Applied prettier to relevant webpack configs

* Replaced ng-annotate with babel-plugin-angularjs-annotate

… and replaced ts-loader with @preset/typescript

* Removed redundant import

… that is problematic with Babel's module resolver

* Updated lockfile

* Traspile debug package to es5 for PhantomJS support

* Update babel to latest version

* Remove @babel/poolyfill and url search params polyfill

* Add ts-loader to grafana-ui dependencies

* Update prod webpack build to use cor-js 3

* Applied prettier to relevant webpack configs

* Replaced ng-annotate with babel-plugin-angularjs-annotate

… and replaced ts-loader with @preset/typescript

* Updated lockfile

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Steven Vachon
2020-01-30 04:54:11 -05:00
committed by GitHub
parent a0ad81180e
commit 9005b484f0
11 changed files with 423 additions and 503 deletions

View File

@@ -1,7 +1,11 @@
import '@babel/polyfill';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import 'whatwg-fetch'; // fetch polyfill needed for PhantomJs rendering
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'; // fetch polyfill needed for PhantomJs rendering
import 'url-search-params-polyfill'; // fetch polyfill needed for PhantomJs rendering
// @ts-ignore
import ttiPolyfill from 'tti-polyfill';
import 'file-saver';
import 'lodash';
import 'jquery';
@@ -19,8 +23,6 @@ import 'vendor/angular-other/angular-strap';
import $ from 'jquery';
import angular from 'angular';
import config from 'app/core/config';
// @ts-ignore
import ttiPolyfill from 'tti-polyfill';
// @ts-ignore ignoring this for now, otherwise we would have to extend _ interface with move
import _ from 'lodash';
import { AppEvents, setLocale, setMarkdownOptions } from '@grafana/data';