From 9d8a578dce4018afabecaaa79c38c415e62d0d46 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 31 May 2022 15:35:48 -0500 Subject: [PATCH] Better comment --- vite.sdk-assets-config.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vite.sdk-assets-config.js b/vite.sdk-assets-config.js index 7174b8db..d7d4d064 100644 --- a/vite.sdk-assets-config.js +++ b/vite.sdk-assets-config.js @@ -3,8 +3,9 @@ const mergeOptions = require('merge-options'); const themeBuilder = require("./scripts/build-plugins/rollup-plugin-build-themes"); const {commonOptions, compiledVariables} = require("./vite.common-config.js"); -// These paths will be saved without their hash so they have a consisent path to -// reference in imports. +// These paths will be saved without their hash so they have a consisent path +// that we can reference in our `package.json` `exports`. And so people can import +// them with a consistent path. const pathsToExport = [ "main.js", "download-sandbox.html", @@ -21,7 +22,8 @@ export default mergeOptions(commonOptions, { output: { assetFileNames: (chunkInfo) => { // Get rid of the hash so we can consistently reference these - // files in our `package.json` `exports` + // files in our `package.json` `exports`. And so people can + // import them with a consistent path. if(pathsToExport.includes(path.basename(chunkInfo.name))) { return "assets/[name].[ext]"; }