编辑:Meteor 1.3发行版,npm package即将发布,允许直接使用没有Webpack的CSS模块
我想通过NPM使用Meteor 1.3中的https://github.com/gajus/react-css-modules.但是readme说使用Webpack.我从来没有使用Webpack,因为在我看来,与Meteor做同样的工作.
那么在这个具体情况下,您是否知道在Meteor 1.3 beta中使用React Module CSS?
实际上这是一个包.千年发展目标也正在考虑在一些阶段将流氓核心带到网页包上.是的,它是构建工具.比现在更模块化,更快.至少在我看来,它的构建工具也非常复杂.
原文链接:https://www.f2er.com/react/301166.html在流星的网页包>
meteor add webpack:webpack meteor remove ecmascript
你需要删除ecmascripts,当你从webpack也得到他们,并有2次安装可能会导致错误.
对于更为完整的答案,Sam Corcos博客文章以及Ben Strahan对Meteor 1.3 Beta的评论.我用它作为教程来获取不同的webpack包.
https://medium.com/@SamCorcos/meteor-webpack-from-the-ground-up-f123288c7b75#.phcq5lvm8
对于你提到的包,我认为webpack.packages.json应该是这样的
{ "private": true,"scripts": { "start": "webpack-dev-server" },"devDependencies": { "babel-core": "^6.4.5","babel-loader": "^6.2.1","babel-preset-es2015": "^6.3.13","babel-preset-react": "^6.3.13","babel-preset-stage-0": "^6.3.13","css-loader": "^0.23.1","extract-text-webpack-plugin": "^1.0.1","style-loader": "^0.13.0","webpack": "^2.0.6-beta","webpack-dev-server": "^2.0.0-beta" },"dependencies": { "react": "^0.15.0-alpha.1","react-css-modules": "^3.7.4","react-dom": "^0.15.0-alpha.1" }
和webpack.config.js你可以直接复制
https://github.com/gajus/react-css-modules-examples/blob/master/webpack.config.js