clean up asset handling
This commit is contained in:
parent
03be5326ce
commit
a1752fc9cd
13
index.mjs
13
index.mjs
|
@ -128,15 +128,7 @@ export function buildConfig ({
|
|||
plugins: [
|
||||
{
|
||||
buildStart () {
|
||||
styles.forEach(absolutePath => {
|
||||
this.emitFile({
|
||||
type: 'asset',
|
||||
fileName: getOutputFilename(absolutePath, 'css'),
|
||||
source: readFileSync(absolutePath, {encoding: 'utf-8'}),
|
||||
});
|
||||
});
|
||||
assets.forEach(absolutePath => {
|
||||
// console.log('rendering binary file', absolutePath);
|
||||
[...styles, ...assets].forEach(absolutePath => {
|
||||
this.emitFile({
|
||||
type: 'asset',
|
||||
fileName: getOutputFilename(absolutePath),
|
||||
|
@ -145,14 +137,13 @@ export function buildConfig ({
|
|||
});
|
||||
},
|
||||
load (id) {
|
||||
// console.log(id);
|
||||
if (id === manifestPath) {
|
||||
// throwaway contents, replaced later
|
||||
return 'debugger;';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
renderChunk (code, chunk) {
|
||||
// console.log(chunk);
|
||||
if (chunk.facadeModuleId !== manifestPath) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue