port

The port configuration is similar to Rspack's devServer port configuration, used to specify the port number to listen on.

  • 类型number
  • 默认值: 8000

Port specifies the port number for the project service to listen on, defaulting to 8000. You can access the project via http://hostname_or_ip:port

示例

emp-config.js
export default defineConfig(store => {
  ...
  return {
    ...
    server: {
      prot: 9002,
      ...
    },
    ...
  }
})

This configuration example means the project will be accessed on port 9002

ON THIS PAGE