实际上有这个包。MDG 也在考虑在某个阶段将 webpacks 引入流星核心。是的,它是构建工具。只是比目前的更模块化和更快。至少在我看来,随着构建工具的发展,它也非常复杂。
在流星中有 webpacks 只是 >
meteor add webpack:webpack
meteor remove ecmascript
您还需要在从 webpack 获取 ecmascript 时删除它们,并且安装 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