Overview
The svelte-rollup-template is an enhanced version of the official Svelte Rollup template. It adds the ability to hash the CSS and JS file names during production builds. This template addresses a GitHub issue related to file name hashing. The project utilizes PostHTML to process compiled assets after the build stage.
Features
- File name hashing: Hashes the file names of CSS and JS bundles during production builds.
- PostHTML integration: Utilizes PostHTML to process compiled assets after the build stage.
- Enhanced Svelte Rollup template: Extends the functionality of the official Svelte Rollup template.
Installation
To use the svelte-rollup-template, follow these steps:
- Scaffold a new project using
degit.
npx degit sveltejs/template svelte-app
cd svelte-app
- Install the necessary dependencies.
npm install
- Start the app in development mode.
npm run dev
Visit
http://localhost:3000to view the app.Customize the port number in the
rollup.config.jsfile if needed.Build the app for production.
npm run build
Summary
The svelte-rollup-template enhances the official Svelte Rollup template by adding file name hashing for CSS and JS bundles during production builds. It also utilizes PostHTML for processing compiled assets after the build stage. This template provides a solution for the GitHub issue related to file name hashing.