question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

overrideDevServer does not work

See original GitHub issue

here is the config-overrides.js (omitted require sentences)

const devServerConfig = () => config => {
    return {
        ...config,
        port: 3001
    }
}

module.exports = {
    webpack: override(
        fixBabelImports('import', {
            libraryName: 'antd',
            libraryDirectory: 'es',
            style: 'css'
        }),
        useBabelRc()
    ),

    devServer: overrideDevServer(devServerConfig())
}

But the port devServer uses is still 3000, not 3001

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:21

github_iconTop GitHub Comments

2reactions
coderwydcommented, Feb 26, 2021

遇到同样问题,修改不了devServe的配置

2reactions
ElsaOOocommented, May 19, 2019

here is my config file, it can proxy 3005 port while my frontend app is running at port 3000

const { 
  override, 
  fixBabelImports,
  overrideDevServer,
} = require('customize-cra');

const devServerConfig = () => config => {
  return {
      ...config,
      port: 3000,
      proxy: {
        '/app/v1': {
          target: 'http://localhost:3005',
          changeOrigin: true,
          ws: false,
          pathRewrite: {
            '^/app/v1': '/app/v1',
          },
          secure: false,
        },
      },
  }
}

module.exports = {
  webpack: override(
    fixBabelImports('import', {
      libraryName: 'antd',
      libraryDirectory: 'es',
      style: 'css',
    }),
  ),
  devServer: overrideDevServer(
    devServerConfig()
  )
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Overriding the DNS for a domain is not working - Server Fault
My clients' website is live at this moment, and I am migrating the website to my new Web Hosting Server. I already uploaded...
Read more >
SCOM 2007 R2 - Overrides not working. - TechNet - Microsoft
Dear Experts,. I am facing the exact issue as described below. I got an idea and checking the same with all the overrides...
Read more >
maven: can't override server.port for tomcat server
So your problem is that your command line (4.) can not override the application.properties file configuration (13., 14., 15.).
Read more >
server.use() or server.resetHandlers do not appear to ... - GitHub
When running as part of a test suite, I do not get the overridden empty array that I want, I see the original...
Read more >
htaccess Not Working - How to Troubleshoot and Fix - KeyCDN
If the AllowOverride directive is set to None then this will disable all .htaccess files. In order to verify this, you must open...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found