Build: optimize frontend build configs to improve superset-ui-plugin dev experience (#9326)

* Upgrade webpack, babel and React

* Upgrade all Babel related packages

Also remove babel-plugin-css-modules-transform that is not in use.

* Remvoe tslib as dependency

* Remove unnecesary packages
This commit is contained in:
Jianchao Yang
2020-03-19 14:57:39 -07:00
committed by GitHub
parent ff703cf01b
commit c4b53a7d42
16 changed files with 13875 additions and 5473 deletions

View File

@@ -196,12 +196,20 @@ describe('SaveModal', () => {
describe('should always reload or redirect', () => {
let wrapper;
let windowLocation;
beforeEach(() => {
wrapper = getWrapper();
windowLocation = window.location;
// To bypass "TypeError: Cannot redefine property: assign"
Object.defineProperty(window, 'location', {
value: { ...windowLocation, assign: () => {} },
});
sinon.stub(window.location, 'assign');
});
afterEach(() => {
window.location.assign.restore();
Object.defineProperty(window, 'location', windowLocation);
});
it('Save & go to dashboard', done => {