Closed stephband closed 3 months ago
there "kinda" is:
{
name: "skip css",
setup: (build) => {
build.onResolve({ filter: /\.css$/, namespace: "file" }, (args) => {
return {
path: Path.resolve(args.resolveDir, args.path),
};
});
build.onLoad({ filter: /\.css$/, namespace: "file" }, (args) => {
const contents = Deno.readFileSync(args.path);
return {
contents: contents,
loader: "css",
};
});
build.onResolve({ filter: /.*/, namespace: "data" }, (args) => {
return args.kind !== "url-token" ? undefined : { external: true };
});
},
},
...denoPlugins({
so this basically handles css resolution and loading before one of the denoPlugins has a chance to handle that.
Of course, whack a handler in before denoPlugins()
. I don't know why I didn't try that, I think I was influenced by this text in the README "In most cases, the denoResolverPlugin should be the first plugin in the plugin array".
Thank you, this solves my problem.
yeah, but the issue still exists, no?
On Wed, Aug 21, 2024, 20:29 stephband @.***> wrote:
Closed #134 https://github.com/lucacasonato/esbuild_deno_loader/issues/134 as completed.
— Reply to this email directly, view it on GitHub https://github.com/lucacasonato/esbuild_deno_loader/issues/134#event-13964783414, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOHZTT3JJ35EKCLJ4XK3PTZSTMA3AVCNFSM6AAAAABLZE35DKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTHE3DINZYGM2DCNA . You are receiving this because you commented.Message ID: @.*** .com>
I just got this lovely set of plugins building my project, thank you. I was using ESbuild to bundle both JS and CSS – not together, but as separate entry points:
Unfortunately
denoPlugins()
borks when fed CSS.Is there a way to get it to ignore these entry points?