mirror of
				https://github.com/home-assistant/frontend.git
				synced 2025-11-04 08:29:52 +00:00 
			
		
		
		
	Enhance webpack transform async plugin to use babel runtime (#20543)
This commit is contained in:
		@@ -10,6 +10,7 @@ const WebpackBar = require("webpackbar");
 | 
			
		||||
const {
 | 
			
		||||
  TransformAsyncModulesPlugin,
 | 
			
		||||
} = require("transform-async-modules-webpack-plugin");
 | 
			
		||||
const { dependencies } = require("../package.json");
 | 
			
		||||
const paths = require("./paths.cjs");
 | 
			
		||||
const bundle = require("./bundle.cjs");
 | 
			
		||||
 | 
			
		||||
@@ -156,7 +157,10 @@ const createWebpackConfig = ({
 | 
			
		||||
          transform: (stats) => JSON.stringify(filterStats(stats)),
 | 
			
		||||
        }),
 | 
			
		||||
      !latestBuild &&
 | 
			
		||||
        new TransformAsyncModulesPlugin({ browserslistEnv: "legacy" }),
 | 
			
		||||
        new TransformAsyncModulesPlugin({
 | 
			
		||||
          browserslistEnv: "legacy",
 | 
			
		||||
          runtime: { version: dependencies["@babel/runtime"] },
 | 
			
		||||
        }),
 | 
			
		||||
    ].filter(Boolean),
 | 
			
		||||
    resolve: {
 | 
			
		||||
      extensions: [".ts", ".js", ".json"],
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user