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