Meteor Publicsources

screenshot of Meteor Publicsources

Create bundles in public directory for lazy-loading components

Overview

The new numtel:lazy-bundles package marks a significant upgrade for Meteor users, offering enhanced handling for file management within the public directory of applications. This package provides an efficient way to manage source files for client-side lazy-loading, ensuring that your application runs smoothly while optimizing loading times. With the ability to describe custom bundles in a .publicsources.json file, developers can streamline their workflow and improve the user experience by loading only what’s necessary.

The transition to using numtel:lazy-bundles replaces the older method, making it essential for developers to adopt this new approach. By incorporating this package, you can easily structure your files for better management, benefiting from the automatic sorting of HTML files and customizable bundle descriptions that cater to your specific application needs.

Features

  • Custom Bundle Configuration: Easily define bundles of source files in a .publicsources.json file, allowing precise control over which files are loaded and when.
  • Automatic Transpilation: Source files are automatically transpiled and merged into single .js and .css files, simplifying the management of multiple files.
  • Flexible File Paths: Supports filenames with directory paths and allows loading from the private directory, enhancing flexibility in file organization.
  • HTML File Prioritization: Automatically sorts HTML files to the beginning of a bundle, ensuring templates are ready for scripts and helpers.
  • Integration with Libraries: Works seamlessly with library loaders like miro:preloader and manuelschoebel:wait-on-lib for efficient file loading during routing.
  • Compatibility with Existing Packages: Integrates easily with other source handler packages, although a restart of Meteor is needed for changes to take effect.
  • Test Application Support: Offers a specific testing approach, allowing developers to monitor application status in the browser instead of through typical commands.