fix output extension problem

better-js
Tommi 2023-03-22 10:12:22 +01:00
parent 783c0b3aae
commit 28d9eb00d9
1 changed files with 3 additions and 3 deletions

View File

@ -108,16 +108,16 @@ module.exports = function(eleventyConfig) {
let output = await require('esbuild').build({
target: 'es2022',
entryPoints: [inputPath],
minify: true,
bundle: true,
write: false,
});
return async () => {
console.log('processing js');
console.log(output.outputFiles[0].text);
return output.outputFiles[0].text;
}
},
compileOptions: {
permalink: (contents, inputPath) => (data) => data.page.filePathStem + '.js',
}
});