For android instal Metro 41/1/2024 Maps 1:1 to the dev setting of the bundles. dev: build the bundle in development mode or not.Options for building the bundle are passed as query parameters (all optional). In order to request a bundle, just change the extension from. All files that are required by the root will be recursively included. The file will be looked in the projectRoot. Bundle Īny JS file can be used as the root for a bundle request. This is transparently handled for you when using require. The way you specify the platform is via the dotted suffix (e.g.ios) and the resolution via the at suffix (e.g. However, the server is also able to serve specific assets depending on the platform and on the requested size (in the case of images). When an asset is requested (an asset is recognized by its extension, which has to be on the assetExts array) it is generally served as-is. The server will treat this specific require calls and make them return the path to that file. In order to request an asset, you can freely use the require method as if it was another JS file. The server has the ability to serve assets, bundles and source maps for those bundles. When inlineSourceMap is true, this property has no effect.Ĭheck Configuring Metro for details on configuration options. It defaults to the same same URL as the bundle, but changing the extension from. sourceMapUrl (string): URL where the source map can be found.sourceMap (boolean): Whether Metro should generate source maps.platform ('web' | 'android' | 'ios'): Which platform to bundle for if a list of platforms is provided.out (string): Path to the output bundle.minify (boolean): Whether Metro should minify the bundle.onProgress (Function): Called during the bundle, every time there's new information available about the module count/progress.onComplete (Function): Called when the bundling finishes.onBegin (Function): Called when the bundling starts.entry (string): Pointing to the entry file to bundle.dev (boolean): Create a development version of the build ( _ENV = 'development').The return value is a Promise that resolves to an object with two properties, code and map. Given a configuration and a set of options that you would typically pass to a server, plus a set of options specific to the bundle itself, a bundle will be built.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |