When vue is packaged, how to package different files according to the requirements?

for example:
a project in which a vue file has two implementations for different customers. Now you want to configure it, enter different commands when packaging, package the corresponding files, and achieve the function.

Mar.26,2022

create a separate webpack configuration with a script.


webpack uses the plug-in extended-define-webpack-plugin to set global variables. According to different parameters,

new ExtendedDefinePlugin({
    //
    __LOCAL__: false,  //
  }),

the landlord can read this article https://codeshelper.com/a/11.. I think it can solve your problem

.
Menu