profile-loader
Delete the specified code according to the profile building time.
构建时根据profile,删除掉指定代码,从而可以用来打出不同的包。
Guide 使用指南
Install
npm install profile-loader
In webpack config
test: /\.$/ use: loader: "profile-loader" options: profile: "profile1" // or profile2,profile3...
In source code
/*include profile1 profile2 start*////); /* If profile is not profile1 or profile2, this line would be removed *//*include end*//*exclude profile2 profile3 start*////); /* If profile is profile2 or profile3, this line would be removed *//*exclude end*/