Skip to content

Commit 593eb34

Browse files
committed
feat: Migrate module build to vite
* Webpack emitted invalid ES module code, as it still contained `require` calls which are undefined on ES modules * Build time is much shorter * Built assets are much smaller (530 kB vs 930 kB) * Remove unneeded import Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 9b347a7 commit 593eb34

File tree

10 files changed

+1204
-83
lines changed

10 files changed

+1204
-83
lines changed

.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@ module.exports = {
1414
plugins: [
1515
'cypress',
1616
],
17+
parserOptions: {
18+
babelOptions: {
19+
plugins: [
20+
'@babel/plugin-syntax-import-assertions',
21+
],
22+
},
23+
},
1724
}

cypress.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { defineConfig } from 'cypress'
22
import { DefinePlugin } from 'webpack'
3-
import getCompareSnapshotsPlugin from 'cypress-visual-regression/dist/plugin'
3+
import getCompareSnapshotsPlugin from 'cypress-visual-regression/dist/plugin.js'
44
import path from 'path'
55
import webpackConfig from '@nextcloud/webpack-vue-config'
6-
import webpackRules from '@nextcloud/webpack-vue-config/rules'
6+
import webpackRules from '@nextcloud/webpack-vue-config/rules.js'
77

8-
import { loadTranslations } from './resources/translations'
8+
import { loadTranslations } from './resources/translations.mjs'
99

1010
const SCOPE_VERSION = Date.now()
1111
webpackRules.RULE_SCSS.use.push({

0 commit comments

Comments
 (0)