Skip to content

Commit

Permalink
perf(vite): improve chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
pataar committed Oct 2, 2023
1 parent 79a5f9a commit d51228f
Show file tree
Hide file tree
Showing 62 changed files with 1,241 additions and 1,090 deletions.
1,933 changes: 1,014 additions & 919 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
"@jaames/iro": "^5.5.2",
"@lezer/highlight": "^1.0.0",
"@sindarius/gcodeviewer": "^3.2.2",
"@types/node": "^18.0.0",
"@types/overlayscrollbars": "^1.12.1",
"@uiw/codemirror-theme-vscode": "^4.19.11",
"axios": "^0.27.0",
"codemirror": "^6.0.1",
Expand All @@ -45,12 +43,12 @@
"echarts-gl": "^2.0.8",
"hls.js": "^1.3.3",
"jmuxer": "^2.0.5",
"js-sha256": "^0.9.0",
"js-sha256": "^0.10.0",
"lodash.kebabcase": "^4.1.1",
"lodash.throttle": "^4.1.1",
"overlayscrollbars": "^1.13.1",
"overlayscrollbars-vue": "^0.2.2",
"regenerator-runtime": "^0.13.9",
"regenerator-runtime": "^0.14.0",
"resize-observer-polyfill": "^1.5.1",
"semver": "^7.5.2",
"typed_janus_js": "^1.0.14",
Expand All @@ -76,8 +74,10 @@
"@types/jmuxer": "^2.0.3",
"@types/lodash.kebabcase": "^4.1.6",
"@types/lodash.throttle": "^4.1.6",
"@types/node": "^20.0.0",
"@types/overlayscrollbars": "^1.12.1",
"@types/semver": "^7.3.8",
"@types/uuid": "^8.3.1",
"@types/uuid": "^9.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
Expand All @@ -87,13 +87,15 @@
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jsonc": "^2.2.1",
"eslint-plugin-vue": "^9.0.0",
"postcss": "^8.4.31",
"postcss-nesting": "^12.0.1",
"prettier": "^3.0.0",
"sass": "~1.32",
"start-server-and-test": "^1.14.0",
"start-server-and-test": "^2.0.0",
"typescript": "^4.5.5",
"unplugin-vue-components": "^0.22.12",
"vite": "^3.2.7",
"vite-plugin-checker": "^0.5.0",
"vite": "^4.4.9",
"vite-plugin-checker": "^0.6.0",
"vite-plugin-package-version": "^1.0.2",
"vite-plugin-pwa": "^0.16.4",
"vite-plugin-vue2": "^2.0.1",
Expand Down
5 changes: 5 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {

Check failure on line 1 in postcss.config.js

View workflow job for this annotation

GitHub Actions / Prettier

postcss.config.js#L1

There are issues with this file's formatting, please run Prettier to fix the errors
"plugins": {
"postcss-nesting": {}
}
}
13 changes: 7 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import TheUploadSnackbar from '@/components/TheUploadSnackbar.vue'
import TheManualProbeDialog from '@/components/dialogs/TheManualProbeDialog.vue'
import TheBedScrewsDialog from '@/components/dialogs/TheBedScrewsDialog.vue'
import TheScrewsTiltAdjustDialog from '@/components/dialogs/TheScrewsTiltAdjustDialog.vue'
import { setAndLoadLocale } from './plugins/i18n'
Component.registerHooks(['metaInfo'])
Expand Down Expand Up @@ -162,8 +163,8 @@ export default class App extends Mixins(BaseMixin) {
}
@Watch('language')
languageChanged(newVal: string): void {
this.$i18n.locale = newVal
async languageChanged(newVal: string): Promise<void> {
await setAndLoadLocale(newVal);
}
@Watch('customStylesheet')
Expand Down Expand Up @@ -303,10 +304,10 @@ export default class App extends Mixins(BaseMixin) {
<style>
@import './assets/styles/fonts.css';
@import './assets/styles/toastr.css';
@import './assets/styles/page.scss';
@import './assets/styles/sidebar.scss';
@import './assets/styles/utils.scss';
@import './assets/styles/updateManager.scss';
@import './assets/styles/page.css';
@import './assets/styles/sidebar.css';
@import './assets/styles/utils.css';
@import './assets/styles/updateManager.css';
:root {
--app-height: 100%;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions src/assets/styles/utils.scss → src/assets/styles/utils.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
@mixin no-select {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

Check failure on line 1 in src/assets/styles/utils.css

View workflow job for this annotation

GitHub Actions / Prettier

src/assets/styles/utils.css#L1

There are issues with this file's formatting, please run Prettier to fix the errors
.user-select-none {
-webkit-touch-callout: none;
Expand Down
2 changes: 1 addition & 1 deletion src/components/CommandHelpModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class CommandHelpModal extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
.command-help-content {
overflow-x: hidden;
Expand Down
2 changes: 1 addition & 1 deletion src/components/TheEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export default class TheEditor extends Mixins(BaseMixin) {
}
}
</script>
<style lang="scss" scoped>
<style scoped>
::v-deep .ͼ1 .cm-panel.cm-search *:focus:not(.focus-visible) {
outline: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/console/ConsoleTable.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style scoped lang="scss"></style>
<style scoped></style>

<template>
<div :class="'consoleTable ' + (isMini ? 'mini' : '')">
Expand Down
2 changes: 1 addition & 1 deletion src/components/console/ConsoleTableEntry.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style scoped lang="scss">
<style scoped>
.consoleTableRow {
font-family: 'Roboto Mono', monospace;
font-size: 0.95em;
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialogs/TheBedScrewsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ export default class TheBedScrewsDialog extends Mixins(BaseMixin, ControlMixin)
}
</script>

<style lang="scss" scoped></style>
<style scoped></style>
2 changes: 1 addition & 1 deletion src/components/dialogs/TheManualProbeDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default class TheManualProbeDialog extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
.v-btn-toggle {
width: 100%;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ExtruderMixi
}
</script>

<style lang="scss" scoped>
<style scoped>
._btn-group {
border-radius: 4px;
display: inline-flex;
Expand Down
3 changes: 1 addition & 2 deletions src/components/panels/Extruder/ExtruderControlPanelTools.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin
}
</script>

<style lang="scss" scoped>
<style scoped>
._btn-group {
border-radius: 4px;
display: inline-flex;
flex-wrap: nowrap;
max-width: 100%;
min-width: 100%;
width: 100%;
.v-btn {
border-radius: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class GitCommitsList extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
.groupedCommits {
padding-top: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class GitCommitsListDayCommit extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
li.commit {
border-color: rgb(48, 54, 61);
border-style: solid;
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/MacrogroupPanel.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>

<template>
<panel
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/ExcludeObject.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>

<template>
<div v-if="['printing', 'paused'].includes(printer_state) && printing_objects.length">
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/ExcludeObjectDialog.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>

<template>
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/ExcludeObjectDialogList.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>

<template>
<div>
Expand Down
3 changes: 1 addition & 2 deletions src/components/panels/Status/ExcludeObjectDialogMap.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<style lang="scss" scoped>
<style scoped>
svg {
//background: rgba(200, 200, 200);
border: 2px solid #888;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/Jobqueue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default class StatusPanelJobqueue extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
.filesJobqueue {
position: relative;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/JobqueueEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export default class StatusPanelJobqueueEntry extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
.filesJobqueue {
position: relative;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/PauseAtLayerDialog.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>

<template>
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/Printstatus.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>

<template>
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/PrintstatusComplete.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>

<template>
<v-card-text class="pa-0">
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/PrintstatusPrinting.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped></style>
<style scoped></style>

<template>
<v-card-text class="pa-0">
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Status/PrintstatusThumbnail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default class StatusPanelPrintstatusThumbnail extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
.statusPanel-big-thumbnail {
transition: height 0.25s ease-out;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/StatusPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export default class StatusPanel extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
._border-radius {
border-bottom-left-radius: inherit;
border-bottom-right-radius: inherit;
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/Temperature/TemperaturePanelList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
.temperature-panel-table th,
.temperature-panel-table ::v-deep td {
padding-top: 5px !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export default class TemperaturePanelListItem extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
::v-deep .v-icon._no-focus-style:focus::after {
opacity: 0 !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class TemperaturePanelListItemNevermore extends Mixins(BaseMixin)
}
</script>

<style lang="scss" scoped>
<style scoped>
::v-deep .v-icon._no-focus-style:focus::after {
opacity: 0 !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class TemperaturePanelPresets extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
._preset-title {
font-size: 0.8125rem;
font-weight: 500;
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/ToolheadControls/BarsControl.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped>
<style scoped>
.btnHomeAxis {
width: 36px;
min-width: 36px !important;
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/ToolheadControls/CircleControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ export default class CircleControl extends Mixins(BaseMixin, ControlMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
svg {
max-height: 350px;
min-height: 275px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/ToolheadControls/CrossControl.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<style lang="scss" scoped>
<style scoped>
.btnMinWidthAuto {
min-width: auto !important;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/ToolheadControls/ZoffsetControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export default class ZoffsetControl extends Mixins(BaseMixin) {
}
</script>

<style lang="scss" scoped>
<style scoped>
.v-btn-toggle {
width: 100%;
}
Expand Down
Loading

0 comments on commit d51228f

Please sign in to comment.