Better comment

This commit is contained in:
Eric Eastwood 2022-05-31 15:35:48 -05:00
parent 38c3774869
commit 9d8a578dce

View File

@ -3,8 +3,9 @@ const mergeOptions = require('merge-options');
const themeBuilder = require("./scripts/build-plugins/rollup-plugin-build-themes"); const themeBuilder = require("./scripts/build-plugins/rollup-plugin-build-themes");
const {commonOptions, compiledVariables} = require("./vite.common-config.js"); const {commonOptions, compiledVariables} = require("./vite.common-config.js");
// These paths will be saved without their hash so they have a consisent path to // These paths will be saved without their hash so they have a consisent path
// reference in imports. // that we can reference in our `package.json` `exports`. And so people can import
// them with a consistent path.
const pathsToExport = [ const pathsToExport = [
"main.js", "main.js",
"download-sandbox.html", "download-sandbox.html",
@ -21,7 +22,8 @@ export default mergeOptions(commonOptions, {
output: { output: {
assetFileNames: (chunkInfo) => { assetFileNames: (chunkInfo) => {
// Get rid of the hash so we can consistently reference these // 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))) { if(pathsToExport.includes(path.basename(chunkInfo.name))) {
return "assets/[name].[ext]"; return "assets/[name].[ext]";
} }