Don't build scenarios server-side
This commit is contained in:
parent
10b27a788d
commit
bf24eda9cb
@ -156,6 +156,9 @@ const resolveSvgImports = {
|
|||||||
setup(build) {
|
setup(build) {
|
||||||
build.onStart(() => {
|
build.onStart(() => {
|
||||||
console.log("BUILD STARTED");
|
console.log("BUILD STARTED");
|
||||||
|
console.log(build.initialOptions.outdir);
|
||||||
|
|
||||||
|
fs.rmSync(path.resolve(build.initialOptions.outdir), { recursive: true, force: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
build.onResolve({ filter: /\.svg$/ }, args => {
|
build.onResolve({ filter: /\.svg$/ }, args => {
|
||||||
@ -199,7 +202,7 @@ const externalSvgToInternal = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const refsQuery = [...refs[filename]].join(', ');
|
const refsQuery = [...refs[filename]].join(', ');
|
||||||
external.querySelectorAll(refsQuery).forEach(node => defs.appendChild(node));
|
external.querySelectorAll(refsQuery).forEach(node => defs.append(node));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -218,7 +221,7 @@ const ctx = await esbuild.context({
|
|||||||
outdir: 'build',
|
outdir: 'build',
|
||||||
plugins: [
|
plugins: [
|
||||||
resolveSvgImports,
|
resolveSvgImports,
|
||||||
externalSvgToInternal,
|
// externalSvgToInternal,
|
||||||
// buildStatusPlugin
|
// buildStatusPlugin
|
||||||
],
|
],
|
||||||
loader: {
|
loader: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user