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

devServer config functional is not work #274

Closed
calvinsnax opened this issue Mar 27, 2021 · 2 comments
Closed

devServer config functional is not work #274

calvinsnax opened this issue Mar 27, 2021 · 2 comments

Comments

@calvinsnax
Copy link

#craco.config.js
module.exports = ({ env }) => {
  return {
    devServer: (
      devServerConfig,
      { env, paths, proxy, allowedHost },
    ) => {
      devServerConfig.port = 4000;
      devServerConfig.contentBasePublicPath = paths.publicUrlOrPath;
      return devServerConfig;
    },
  };
};

How can I do? is it bug?

@pomelott
Copy link

pomelott commented Apr 14, 2021

#craco.config.js
module.exports = ({ env }) => {
  return {
    devServer: (
      devServerConfig,
      { env, paths, proxy, allowedHost },
    ) => {
      devServerConfig.port = 4000;
      devServerConfig.contentBasePublicPath = paths.publicUrlOrPath;
      return devServerConfig;
    },
  };
};

How can I do? is it bug?

craco.config.js don't support this, this configed passively in creat-react-app. you can change it in .env、.env.development and so on. for detail, view https://create-react-app.dev/docs/advanced-configuration

@stale
Copy link

stale bot commented Jun 14, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

2 participants