Package com.vaadin.flow.server.frontend
Class BundleUtils
java.lang.Object
com.vaadin.flow.server.frontend.BundleUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyPackageLockFromBundle
(Options options) Copy package-lock.json/.yaml file from existing dev-bundle for building new bundle.static String
getChunkId
(Class<? extends Component> componentClass) Gets the id for a chunk defined by the given class.static String
getChunkId
(String className) Gets the id for a chunk defined by the given class.static boolean
Returns whether the application uses pre-compiled production bundle or a custom bundle.Loads stats.json from the classpath (from the production bundle) and returns the "bundleImports" part of it.
-
Method Details
-
loadBundleImports
Loads stats.json from the classpath (from the production bundle) and returns the "bundleImports" part of it.- Returns:
- the bundle imports as a set
-
getChunkId
Gets the id for a chunk defined by the given class.- Parameters:
componentClass
- the class- Returns:
- an identifier for the component class that does not reveal the name of the component class
-
getChunkId
Gets the id for a chunk defined by the given class.- Parameters:
className
- the name of the class- Returns:
- an identifier for the component class that does not reveal the name of the component class
-
isPreCompiledProductionBundle
public static boolean isPreCompiledProductionBundle()Returns whether the application uses pre-compiled production bundle or a custom bundle.- Returns:
true
in case of pre-compiled bundle,false
otherwise
-
copyPackageLockFromBundle
Copy package-lock.json/.yaml file from existing dev-bundle for building new bundle.- Parameters:
options
- task options
-