Improve build times

* Fix bulma/buefy being imported many (many !!!) times

* Remove javascript-time-ago because date-fns pretty much does the same
thing

* Make sure languages are loaded asynchronously

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-10-13 20:39:59 +02:00
parent f627cab292
commit 93cecbe49c
66 changed files with 167 additions and 283 deletions

View File

@@ -27,23 +27,21 @@ export default class DateCalendarIcon extends Vue {
*/
@Prop({ required: true }) date!: string;
get dateObj() {
get dateObj(): Date {
return new Date(this.$props.date);
}
get month() {
get month(): string {
return this.dateObj.toLocaleString(undefined, { month: "short" });
}
get day() {
get day(): string {
return this.dateObj.toLocaleString(undefined, { day: "numeric" });
}
}
</script>
<style lang="scss" scoped>
@import "../../variables.scss";
time.datetime-container {
background: $backgrounds;
border: 1px solid $borders;

View File

@@ -115,8 +115,6 @@ export default class EventCard extends Vue {
</script>
<style lang="scss" scoped>
@import "../../variables";
a.card {
display: block;
background: $secondary;

View File

@@ -275,8 +275,6 @@ export default class EventListCard extends mixins(ActorMixin, EventMixin) {
</script>
<style lang="scss" scoped>
@import "../../variables";
article.box {
div.tag-container {
position: absolute;

View File

@@ -104,8 +104,6 @@ export default class EventListViewCard extends mixins(ActorMixin, EventMixin) {
</script>
<style lang="scss" scoped>
@import "../../variables";
article.box {
div.content {
padding: 5px;

View File

@@ -20,8 +20,6 @@ export default class EventMetadataBlock extends Vue {
}
</script>
<style lang="scss" scoped>
@import "../../variables.scss";
h2 {
font-size: 1.8rem;
font-weight: 500;