huqingliang
huqingliang
``` if (!loginRequired) { debug('not match needLogin path, %j', this.path); return yield next; } ``` 这段拎出来呢?/login加入白名单,让他直接跳到下一个中间件
或者这样? ``` if (!this.session) to if (!this.session || !this.session[options.userField]) ```
你是指cssModules吗? 这个需要在webpack里增加一项配置: ``` var sassLoader = 'style!css?sourceMap!sass?sourceMap&sourceMapContents' + '&includePaths[]=' + encodeURIComponent(path.resolve(__dirname, "./src/styles")) + '&includePaths[]=' + encodeURIComponent(path.resolve(__dirname, "./node_modules/xxx/src/styles")); ... { test: /\.scss$/, include: [ path.resolve(__dirname, 'src/styles'), fs.realpathSync('./node_modules/xxx/src/styles'), ], loader: sassLoader }...
好了,pull下 https://github.com/huqingliang/react-server/commit/2810e204618a0b9bb7f9f81aa8cc4261e7b030ea