How does require(‘file.less’) execute in a node environment

  node.js, question

When using browserify or webpack to package the react component, the requileress file will be packaged normally because of loader or transform, but there will be problems when doing server rendering in node environment.
However, seeing that react-starter-kit and other projects can be used in a similar way, how is this achieved?

I found the answer myself. …
Webpack is so powerful that scripts packaged with it can run in a variety of environments. Web environment is only its default …
Webpack can pack Node code and then run it on node … which is also a bit of a shame-
Settings in various environments can be configured in the webpack config file.

export default [appConfig, serverConfig];