Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}";
Expand Down Expand Up @@ -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"
* }
Expand Down Expand Up @@ -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)
}
Expand Down
3 changes: 2 additions & 1 deletion dist/makeDefaultRspackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
6 changes: 3 additions & 3 deletions src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => {
Expand Down Expand Up @@ -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"
* }
Expand Down Expand Up @@ -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)
}
Expand Down
3 changes: 2 additions & 1 deletion src/makeDefaultRspackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
Loading