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 support dev server false #1921

Merged
merged 9 commits into from
Aug 15, 2024
Merged

Conversation

alexander-akait
Copy link
Member

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • documentation update
  • typo fix
  • metadata update

Motivation / Use-Case

ref webpack/webpack-cli#4045

Breaking Changes

No

Additional Info

When you have devServer: false in your multi comiler mode we will just watch and do not server, so you can use something like:

const path = require("path");

module.exports = [
  {
    target: "webworker",
    mode: "development",
    entry: "./workers/worker.js",
    output: {
      path: path.resolve(__dirname, `public`),
    },
    devServer: false,
  },
  {
    devtool: false,
    mode: "development",
    entry: "./entries/entry1.js",
    output: {
      path: path.resolve(__dirname, `static`),
      publicPath: "/static/"
    },
    devServer: {
      host: "localhost",
    },
  },
];

Useful when you have something what should just bundle and handle like static content - https://expressjs.com/en/starter/static-files.html

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.05%. Comparing base (fdd8801) to head (c2f040a).
Report is 1 commits behind head on master.

Files Patch % Lines
src/utils/setupWriteToDisk.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1921      +/-   ##
==========================================
- Coverage   96.14%   96.05%   -0.10%     
==========================================
  Files          13       13              
  Lines         831      837       +6     
  Branches      228      233       +5     
==========================================
+ Hits          799      804       +5     
- Misses         32       33       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexander-akait alexander-akait merged commit b443f4d into master Aug 15, 2024
4 of 14 checks passed
@alexander-akait alexander-akait deleted the fix-support-dev-server-false branch August 15, 2024 14:49
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.

1 participant