Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert dynamic import of webpack config file #24598

Merged
merged 1 commit into from Nov 8, 2022

Conversation

ZachJW34
Copy link
Contributor

@ZachJW34 ZachJW34 commented Nov 8, 2022

User facing changelog

n/a

Additional details

This PR reverts the change made to webpack-dev-server for how we are loading the sourced webpack.config.{js,ts}. Previously it was using loadModule which is basically a require. We changed it to use a dynamic import but this no longer works when doing await import('{project-root}/webpack.config.ts') as ts-node does not process the typescript webpack config file.

No user-facing change as the dynamic import was never published.

Steps to test

On develop, run yarn cypress:open and choose an app that has a webpack.config.ts and does not specify it in the cypress.config.ts. svelte-webpack-ts is a good example. This will fail.

Checkout this branch and run yarn. Run the same steps above and the app will load.

How has the user experience changed?

Screen.Recording.2022-11-08.at.11.27.08.AM.mov

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?

@cypress-bot
Copy link

cypress-bot bot commented Nov 8, 2022

Thanks for taking the time to open a PR!

Copy link
Contributor

@rockindahizzy rockindahizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this quickly!

@astone123 astone123 self-requested a review November 8, 2022 17:35
Copy link
Contributor

@astone123 astone123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed the issue for me 🎉

@rockindahizzy rockindahizzy self-requested a review November 8, 2022 17:47
@cypress
Copy link

cypress bot commented Nov 8, 2022



Test summary

84 0 12 0Flakiness 0


Run details

Project cypress
Status Passed
Commit a7ce390
Started Nov 8, 2022 6:12 PM
Ended Nov 8, 2022 6:27 PM
Duration 14:39 💡
OS Linux Debian -
Browser Chrome 106

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Contributor

@rockindahizzy rockindahizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked

@rockindahizzy rockindahizzy merged commit 69f7dab into develop Nov 8, 2022
78 of 86 checks passed
@rockindahizzy rockindahizzy deleted the zachw/fix-webpack-config-load branch November 8, 2022 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants