咖啡机 将编译为JavaScript。 入门 首先,您需要安装coffeescript和coffee-loader : npm install --save-dev coffeescript coffee-loader 然后将插件添加到您的webpack配置中。 例如: file.coffee # Assignment: number = 42 opposite = true # Conditions: number = - 42 if opposite # Functions: square = ( x ) -> x * x # Arrays: list = [ 1 , 2 , 3 , 4 , 5 ] # Objects: math = root : Math . sqrt square : square cube : ( x ) -> x * squar