Skip to content

(fix) - HMR and Typescript #1395

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

Merged
merged 2 commits into from
Sep 2, 2020
Merged

(fix) - HMR and Typescript #1395

merged 2 commits into from
Sep 2, 2020

Conversation

JoviDeCroock
Copy link
Member

On windows the exclude of the Babel.overrides doesn't work making transformations not apply correctly. We had multiple copies of the devServer present and some of them hot others not which make WDS confused.

I need to accurately test this PR a bit more, tested on Windows and it works now need to do it on a UNIX machine.

@@ -36,14 +36,6 @@ async function clientConfig(env) {
polyfills: resolve(__dirname, './polyfills'),
};

if (!isProd) {
entry.bundle = [
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed the unneeded devServers

Copy link
Member

Choose a reason for hiding this comment

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

Does this automatically get added by the plugin / config option?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is part of the DevServer.hot option

@@ -73,7 +73,6 @@ async function devBuild(env) {

let c = Object.assign({}, config.devServer, {
stats: { colors: true },
hot: !env.refresh,
Copy link
Member Author

Choose a reason for hiding this comment

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

Enabled the hot-server which we use as a base

@JoviDeCroock JoviDeCroock marked this pull request as ready for review September 2, 2020 07:16
@JoviDeCroock JoviDeCroock requested a review from a team as a code owner September 2, 2020 07:16
Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

This is fantastic! Outstanding debugging skills🙌

@@ -25,7 +25,7 @@ const cleanFilename = (name) =>
);

async function clientConfig(env) {
const { isProd, source, src, refresh, cwd /*, port? */ } = env;
const { isProd, source, src, cwd /*, port? */ } = env;
Copy link
Member

Choose a reason for hiding this comment

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

We should probably remove any mentions of the --refresh flag in the Readme too👍

Copy link
Member Author

Choose a reason for hiding this comment

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

it still works, just removed from the clientConfig and now exclusively present in the devConfig

@marvinhagemeister marvinhagemeister merged commit fe0745e into master Sep 2, 2020
@marvinhagemeister marvinhagemeister deleted the fix-prefersh branch September 2, 2020 08:31
@Inviz
Copy link

Inviz commented Sep 2, 2020

Thank you for giving this issue your attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants