From cb2bf43f301f263e40102c276dd1bb6566329723 Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 6 Jan 2025 17:36:43 -0600 Subject: [PATCH] docs: Update content-scripts.md --- docs/guide/essentials/content-scripts.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/guide/essentials/content-scripts.md b/docs/guide/essentials/content-scripts.md index 70323401..86e346bb 100644 --- a/docs/guide/essentials/content-scripts.md +++ b/docs/guide/essentials/content-scripts.md @@ -4,12 +4,14 @@ outline: deep # Content Scripts +> To create a content script, see [Entrypoint Types](/guide/essentials/entrypoints#content-scripts). + ## Context The first argument to a content script's `main` function is it's "context". ```ts -// entrypoints/content.ts +// entrypoints/example.content.ts export default defineContentScript({ main(ctx) {}, }); @@ -62,7 +64,7 @@ In regular web extensions, CSS for content scripts is usually a separate CSS fil In WXT, to add CSS to a content script, simply import the CSS file into your JS entrypoint, and WXT will automatically add the bundled CSS output to the `css` array. ```ts -// entrypoints/content/index.ts +// entrypoints/example.content/index.ts import './style.css'; export default defineContentScript({