Remove babel minify as it causes problems with mapbox
This commit is contained in:
parent
7da2038e02
commit
5e4208067c
@ -37,7 +37,6 @@
|
|||||||
"@types/mapbox-gl-leaflet": "^0.0.1",
|
"@types/mapbox-gl-leaflet": "^0.0.1",
|
||||||
"@types/uuid": "^3.4.6",
|
"@types/uuid": "^3.4.6",
|
||||||
"@types/workbox-window": "^4.3.3",
|
"@types/workbox-window": "^4.3.3",
|
||||||
"babel-minify-webpack-plugin": "^0.3.1",
|
|
||||||
"clean-webpack-plugin": "^3.0.0",
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
"imagemin-webpack-plugin": "^2.3.0",
|
"imagemin-webpack-plugin": "^2.3.0",
|
||||||
|
@ -2,7 +2,7 @@ import Component from "vue-class-component";
|
|||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import { Stop, StopGroup, StopGroups } from "../model";
|
import { Stop, StopGroup, StopGroups } from "../model";
|
||||||
import { Prop, Watch } from "vue-property-decorator";
|
import { Prop, Watch } from "vue-property-decorator";
|
||||||
import { ensureArray, FetchingState, filter, map } from "../utils";
|
import { ensureArray, FetchingState, filter, map, time } from "../utils";
|
||||||
import { debounce } from "../decorators";
|
import { debounce } from "../decorators";
|
||||||
import urls from '../urls';
|
import urls from '../urls';
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ export class FinderComponent extends Vue {
|
|||||||
const groups = map(
|
const groups = map(
|
||||||
this.found,
|
this.found,
|
||||||
(group: StopGroup, name: string) =>
|
(group: StopGroup, name: string) =>
|
||||||
group.filter(stop => !this.blacklist.some(blacklisted => blacklisted.id == stop.id))
|
group.filter(stop => !this.blacklist.some(blacklisted => blacklisted.id === stop.id))
|
||||||
) as StopGroups;
|
) as StopGroups;
|
||||||
|
|
||||||
return filter(groups, group => group.length > 0);
|
return filter(groups, group => group.length > 0);
|
||||||
|
@ -67,3 +67,11 @@ export function get(object: any, path: string): any {
|
|||||||
export function distinct<T>(value: T, index: number, array: T[]) {
|
export function distinct<T>(value: T, index: number, array: T[]) {
|
||||||
return array.indexOf(value) === index;
|
return array.indexOf(value) === index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function time<T>(action: () => T, name?: string) {
|
||||||
|
const start = performance.now();
|
||||||
|
const result = action();
|
||||||
|
console.debug(`${name || 'this'} operation took ${performance.now() - start}ms`);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
@ -20,7 +20,8 @@ const config = {
|
|||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.tsx', '.ts', '.js'],
|
extensions: ['.tsx', '.ts', '.js'],
|
||||||
alias: {
|
alias: {
|
||||||
'vue$': 'vue/dist/vue.esm.js'
|
'vue$': 'vue/dist/vue.esm.js',
|
||||||
|
'mapbox-gl$': 'mapbox-gl/dist/mapbox-gl-unminified'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
@ -71,12 +72,7 @@ const config = {
|
|||||||
}],
|
}],
|
||||||
swDest: '../service-worker.js'
|
swDest: '../service-worker.js'
|
||||||
})
|
})
|
||||||
],
|
]
|
||||||
optimization: {
|
|
||||||
minimizer: [
|
|
||||||
new BabelMinifyPlugin()
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = (env, argv) => {
|
module.exports = (env, argv) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user