rich-lamp-44536
01/18/2022, 8:57 PMdev-server start
)rich-lamp-44536
01/18/2022, 8:57 PMrich-lamp-44536
01/18/2022, 8:58 PMts
import { startDevServer } from '@cypress/vite-dev-server';
import path from 'node:path';
/**
* @param on is used to hook into various events Cypress emits
* @param config is the resolved Cypress config
*/
export default (
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
): void | Cypress.ConfigOptions | Promise<Cypress.ConfigOptions> => {
on('dev-server:start', async (options) => {
return startDevServer({
options,
viteConfig: {
configFile: path.resolve(__dirname, '..', '..', 'vite.config.ts'),
},
});
});
return config;
};
rich-lamp-44536
01/18/2022, 8:59 PMdev-server:start
on
-callback, it does not show up 🙁
The server is not starting a vite instance.rich-lamp-44536
01/18/2022, 9:00 PMts
import content from '@originjs/vite-plugin-content';
import { quasar, transformAssetUrls } from '@quasar/vite-plugin';
import vue from '@vitejs/plugin-vue';
import { resolve } from 'node:path';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
template: { transformAssetUrls },
}),
quasar({
autoImportComponentCase: 'pascal',
sassVariables: 'src/quasar-variables.scss',
}),
content(),
],
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
css: {
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset(atRule) {
if (atRule.name === 'charset') {
atRule.remove();
}
},
},
},
],
},
},
server: {
port: 5173,
},
preview: {
port: 4173,
},
});
rich-lamp-44536
01/18/2022, 9:01 PMrich-lamp-44536
01/18/2022, 9:02 PM"@cypress/vite-dev-server": "~2.2.2"
"@cypress/vue": "~3.0.0-beta.4"
"cypress": "~9.2.1"
rich-lamp-44536
01/18/2022, 9:04 PMrich-lamp-44536
01/19/2022, 7:41 AMrich-lamp-44536
01/19/2022, 12:36 PMrich-lamp-44536
01/19/2022, 1:07 PMjs
"cypress": "cypress",
"cypress:open": "run-p --race start 'cypress open'",
"cypress:open:ct": "cypress open-ct",
"cypress:run": "run-p --race start 'cypress run'",
"cypress:run:ct": "cypress run-ct",