![]() ![]() If that's not what you expect, you probably got it wrong from the beginning. With local copy it just a javascript lib, and need npm command to run each compile, also bring more work I think. In the root of the project I will create a file named. Import modules and create some variables. The next step is to work on the webpack config file. ![]() Go ahead and run npm install to install these dependencies. If you have similar projects, you can either copy them around or create a git branch to achieve the result. npm start will run the command client webpack-dev-server and tell it to look for the Webpack config. And certainly lots of CLI tools are working as the same way webpack does, reading each individual configuration files per project, not globally. Installing global package is not recommended if you have multiple projects to run. You probably had it wrong regarding how node.js works. What I expected is if I install webpack globally, I can run 'webpack' command at the project root folder, then it will read webpack-config.js file and execute full compile logic, in that way I can share the same webpack copy across different projects and make the compile much easy. Lot's of projects are using it to generate a complex website/web app, not just compile one file at a time. ![]() webpack is a powerful tool but highly depends on how you use it. And seems it only compile one file each time not full compile, that may not good for big project which contain many export files. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |