Skip to content

Commit 73dc61f

Browse files
Migrate to ES6 modules
Configure project to use ES6 modules to enable top-level await capabilities. This change helps project to align well with modern JS standards. - Set `type` to `module` in `package.json`. - Use import/export syntax in Cypress configuration files. - Rename configurations files that do not support modules to use the `.cjs` extension: - `vue.config.js` to `vue.config.cjs` (vuejs/vue-cli#4477). - `babel.config.js` to `babel.config.cjs (babel/babel-loader#894) - `.eslintrc.js` to `.eslintrc.cjs` (eslint/eslint#13440, eslint/eslint#14137) - `postcss.config.js` to `postcss.config.cjs` (postcss/postcss#1771) - Provide a workaround for Vue CLI & Mocha ES6 modules conflict in Vue configuration file (vuejs#7417).
1 parent 6a20d80 commit 73dc61f

File tree

11 files changed

+1561
-3
lines changed

11 files changed

+1561
-3
lines changed
File renamed without changes.
File renamed without changes.

cypress.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { defineConfig } from 'cypress'
1+
import { defineConfig } from 'cypress';
2+
import setupPlugins from './tests/e2e/plugins/index.js';
23

34
export default defineConfig({
45
fixturesFolder: 'tests/e2e/fixtures',
56
screenshotsFolder: 'tests/e2e/screenshots',
67
videosFolder: 'tests/e2e/videos',
78
e2e: {
89
setupNodeEvents(on, config) {
9-
return require('./tests/e2e/plugins/index.js')(on, config)
10+
return setupPlugins(on, config);
1011
},
1112
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',
1213
supportFile: 'tests/e2e/support/index.js',

0 commit comments

Comments
 (0)