title: Angular and webpack 4.44.2 error Can't import the named export 'URL' from non EcmaScript module (only default export is available)
body: <p>I working with Angualar 11 project using webpack. The project running on OpenShift. It uses webpack 4.44.2 version, node 12 version. The project suddenly on build phase throw an error</p>
  <p><strong>[2021-09-21T14:59:36.679Z] Can't import the named export 'URL' from non EcmaScript module (only default export is available)</strong></p>
  <p>My webpack config file is:</p>
  <pre><code>const path = require(&quot;path&quot;);
  
  const { NODE_ENV = &quot;production&quot; } = process.env;
  
  module.exports = {
    entry: &quot;./server&quot;,
    mode: NODE_ENV,
    target: &quot;node&quot;,
    output: {
      path: path.resolve(__dirname, &quot;dist&quot;),
      filename: &quot;server.js&quot;,
    },
    resolve: {
      extensions: [&quot;.ts&quot;, &quot;.js&quot;],
    },
  };
  </code></pre>
  <p>in my package.json file the  build command is :</p>
  <pre><code>&quot;build:server&quot;: &quot;webpack --config=./webpack-server.config.js&quot;
  </code></pre>