webpack-contrib / copy-webpack-plugin

Copy files and directories with webpack
MIT License
2.84k stars 281 forks source link

why hang on 97% [0] emitting CopyPlugin in window but mac will not #405

Closed bigbossx closed 4 years ago

bigbossx commented 4 years ago

Expected Behavior

Actual Behavior

Only hang on compile under the window, Mac will not。 in window,The file copy seems to be successful, but too much, there is no way to confirm one by one, there is no log using the configuration {{logLevel: 'error'}

企业微信截图_15721035819249

Code

// webpack.config.js
 plugins: [
        new CopyPlugin([
          {
            from: "wxs",
            to: "wxs",
            ignore: ["*.less", "*.js"]
          },
          {
            from: "components/template",
            to: "components/template"
          },
          { from: "images", to: "images" },
          { from: "wxParse", to: "wxParse", ignore: ["*.less", "*.js"] },
          { from: "wxs", to: "promotion_pages/_/wxs", ignore: ["*.less", "*.js"] }
        ], { logLevel: 'error', context: path.resolve(__dirname, "./../src/") }),
        new webpack.DefinePlugin({
          INJECTION_FROM_WEBPACK: getInjection()
        })
      ]

How Do We Reproduce?

bigbossx commented 4 years ago

Under node version 10.15.0, the compilation was interrupted and there was no information. So I tried to upgrade the version of node and see if there will be any changes. As expected, the compiler printed an error and found that my output path does have a special character —— ' : ' . then I modified it and everything is fine. It’s great.