onClick not work after add new own plugin #1051
Replies: 1 comment
-
Closing. If this is still an issue I'd recommend opening an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, first, sorry for my english.
I
add new plugin
for inject Google Tag Manager into my deno fresh project, so i add:// plugins/gtm/gtm.ts
import { Plugin } from "$fresh/server.ts";
export default function gtm(): Plugin {
return {
name: "gtm",
entrypoints: { "tag": import.meta.resolve("./tag.js") },
render(ctx) {
const res = ctx.render();
const scripts = [];
};
}
// plugins/gtm/tag.js
// any custom js, ex:
alert();
// main.ts
...
...
...
import { start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";
import "https://deno.land/[email protected]/dotenv/load.ts";
import twindPlugin from "$fresh/plugins/twind.ts";
import twindConfig from "./twind.config.ts";
import gtmPlugin from "./plugins/gtm/gtm.ts";
await start(manifest, { port: 3000, plugins: [twindPlugin(twindConfig), gtmPlugin()]});
After
i add the pluginall onclick tag functions not work
.// islands/Header.tsx
......
<a onClick={() => setHelpActive(!helpActive)} ">Cerrar
I hope it is understood, and can reproduce the error. Stay tuned to your comments
Beta Was this translation helpful? Give feedback.
All reactions