简体   繁体   English

Webpack:webpack.config.js 是否被提交?

[英]Webpack: Does webpack.config.js get commited?

Commiting to a repo now.现在承诺回购。 Does webpack.config.js get committed or is that generated on npm install? webpack.config.js 是被提交还是在 npm install 上生成的?

Does webpack.config.js get committed[?] webpack.config.js 是否被提交[?]

Yes you should commit your build configuration files so that others can build your project using them.是的,您应该提交构建配置文件,以便其他人可以使用它们构建您的项目。 That includes webpack config files.这包括 webpack 配置文件。

or is that generated on npm install?还是在 npm install 上生成的?

npm has nothing to do with webpack config generation. npm 与 webpack 配置生成无关。 Running npm install will install your npm dependencies as defined in your package.json .运行npm install将安装在package.json定义的 npm 依赖项。 You should add webpack as a dependency to your package.json by running npm install webpack --dev .您应该通过运行npm install webpack --devwebpack作为依赖项添加到package.json

Running npm install might install a dependency which has a webpack.config.js , but this will not have been generated per se.运行npm install可能会安装一个具有webpack.config.js的依赖webpack.config.js ,但这本身不会生成 The node_modules folder should be in your .gitignore file and as such you should not have to worry about accidentally committing files within node_modules . node_modules文件夹应该在您的.gitignore文件中,因此您不必担心在node_modules意外提交文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM