Better comment

This commit is contained in:
Eric Eastwood 2022-05-31 15:35:48 -05:00
parent 38c3774869
commit 9d8a578dce
1 changed files with 5 additions and 3 deletions

View File

@ -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]";
}