Added importing of CSS (as text), images (as data URLs)
parent
96d945bc56
commit
d5ebab0358
|
@ -120,6 +120,10 @@ async function run() {
|
|||
if (
|
||||
filename.endsWith(".plug.yaml") ||
|
||||
filename.endsWith(".js") ||
|
||||
filename.endsWith(".css") ||
|
||||
filename.endsWith(".png") ||
|
||||
filename.endsWith(".jpg") ||
|
||||
filename.endsWith(".gif") ||
|
||||
(filename.endsWith(".ts") && !filename.endsWith("_in.ts"))
|
||||
) {
|
||||
console.log("Change detected", eventType, filename);
|
||||
|
|
|
@ -41,6 +41,12 @@ export async function compile(
|
|||
outfile: outFile,
|
||||
metafile: true,
|
||||
external: excludeModules,
|
||||
loader: {
|
||||
".css": "text",
|
||||
".png": "dataurl",
|
||||
".gif": "dataurl",
|
||||
".jpg": "dataurl",
|
||||
},
|
||||
absWorkingDir: path.resolve(path.dirname(inFile)),
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue