diff --git a/dist/loader.js b/dist/loader.js index 640165d..83e9b55 100644 --- a/dist/loader.js +++ b/dist/loader.js @@ -14,7 +14,7 @@ const debug = (0, debug_1.default)('cypress-rspack-dev-server:rspack'); */ const makeImport = (file, filename, chunkName) => { // If we want to rename the chunks, we can use this - const magicComments = chunkName ? `/* rspackChunkName: "${chunkName}" */` : ''; + const magicComments = chunkName ? `/* webpackChunkName: "${chunkName}" */` : ''; return `"${filename}": { shouldLoad: () => { const newLoad = new URLSearchParams(document.location.search).get("specPath") === "${file.absolute}"; @@ -42,7 +42,7 @@ const makeImport = (file, filename, chunkName) => { return newLoad | oldLoad; }, * load: () => { - * return import("/Users/projects/my-app/cypress/component/App.spec.js" \/* rspackChunkName: "spec-0" *\/) + * return import("/Users/projects/my-app/cypress/component/App.spec.js" \/* webpackChunkName: "spec-0" *\/) * }, * chunkName: "spec-0" * } @@ -89,7 +89,7 @@ function loader() { var supportFile = { absolute: ${supportFileAbsolutePath}, relative: ${supportFileRelativePath}, - load: () => import(/* rspackChunkName: "cypress-support-file" */ ${supportFileAbsolutePath}), + load: () => import(/* webpackChunkName: "cypress-support-file" */ ${supportFileAbsolutePath}), } scriptLoaders.unshift(supportFile) } diff --git a/dist/makeDefaultRspackConfig.js b/dist/makeDefaultRspackConfig.js index 4a4174d..ad46e60 100644 --- a/dist/makeDefaultRspackConfig.js +++ b/dist/makeDefaultRspackConfig.js @@ -26,9 +26,10 @@ function makeCypressRspackConfig(config) { mode: 'development', optimization, output: { - filename: '[name].[contenthash].js', + filename: '[name].js', path: OUTPUT_PATH, publicPath, + uniqueName: 'cypress-rspack-dev-server', }, plugins: [ new core_1.HtmlRspackPlugin({ diff --git a/src/loader.ts b/src/loader.ts index e4724b1..bc60124 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -15,7 +15,7 @@ const debug = debugFn('cypress-rspack-dev-server:rspack') */ const makeImport = (file: Cypress.Cypress['spec'], filename: string, chunkName: string) => { // If we want to rename the chunks, we can use this - const magicComments = chunkName ? `/* rspackChunkName: "${chunkName}" */` : '' + const magicComments = chunkName ? `/* webpackChunkName: "${chunkName}" */` : '' return `"${filename}": { shouldLoad: () => { @@ -47,7 +47,7 @@ const makeImport = (file: Cypress.Cypress['spec'], filename: string, chunkName: return newLoad | oldLoad; }, * load: () => { - * return import("/Users/projects/my-app/cypress/component/App.spec.js" \/* rspackChunkName: "spec-0" *\/) + * return import("/Users/projects/my-app/cypress/component/App.spec.js" \/* webpackChunkName: "spec-0" *\/) * }, * chunkName: "spec-0" * } @@ -99,7 +99,7 @@ export default function loader(this: unknown) { var supportFile = { absolute: ${supportFileAbsolutePath}, relative: ${supportFileRelativePath}, - load: () => import(/* rspackChunkName: "cypress-support-file" */ ${supportFileAbsolutePath}), + load: () => import(/* webpackChunkName: "cypress-support-file" */ ${supportFileAbsolutePath}), } scriptLoaders.unshift(supportFile) } diff --git a/src/makeDefaultRspackConfig.ts b/src/makeDefaultRspackConfig.ts index d6eeded..799169e 100644 --- a/src/makeDefaultRspackConfig.ts +++ b/src/makeDefaultRspackConfig.ts @@ -43,9 +43,10 @@ export function makeCypressRspackConfig(config: CreateFinalRspackConfig): Config mode: 'development', optimization, output: { - filename: '[name].[contenthash].js', + filename: '[name].js', path: OUTPUT_PATH, publicPath, + uniqueName: 'cypress-rspack-dev-server', }, plugins: [ new HtmlRspackPlugin({