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 yarn dev #4574

Merged
merged 2 commits into from
May 21, 2022
Merged

Fix yarn dev #4574

merged 2 commits into from
May 21, 2022

Conversation

nemchik
Copy link
Contributor

@nemchik nemchik commented May 16, 2022

This may significantly change how the webpack development config behaves. Instead of replacing entry and plugins this will append to the existing values. This makes the dev-server use the webpack development config (previously it used production).

Completely rewrote the changes here. Main thing is the mini css extract was needed in the dev webpack config mode.

Also added using output.clean https://webpack.js.org/configuration/output/#outputclean instead of removing files from the output directory manually.

@MaxLeiter
Copy link
Member

Tests dont seem to be happy with this change

@@ -6,7 +6,7 @@ module.exports = (app) => {
log.debug("Starting server in development mode");

const webpack = require("webpack");
const webpackConfig = require("../../webpack.config.js");
const webpackConfig = require("../../webpack.config.js")(undefined, {mode: "production"});
Copy link
Member

Choose a reason for hiding this comment

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

mode production?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

src/plugins/dev-server.js does in fact use the production webpack config. This is one commit before the cjs changes i PR'd

const webpackConfig = require("../../webpack.config.js");
and browsing the repo at that commit shows there is a webpack.config-test.js but that's not what the dev-server is using.

@MaxLeiter MaxLeiter merged commit 2e3d9a6 into thelounge:master May 21, 2022
@MaxLeiter MaxLeiter added this to the 4.3.2 milestone May 21, 2022
@MaxLeiter MaxLeiter added the Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. label May 21, 2022
@nemchik nemchik deleted the fix-yarn-dev branch May 21, 2022 21:45
@MaxLeiter MaxLeiter modified the milestones: 5.0.0, 4.4.0 Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants