Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8008ab9
feat!: Remove `webextension-polyfill` (#1084)
aklinker1 Oct 19, 2024
3682fe2
fix!: Add suffix to non-production output directories (#1086)
aklinker1 Oct 19, 2024
4fbe618
fix!: Remove deprecated `jiti` entrypoint loader (#1087)
aklinker1 Oct 19, 2024
f23827a
fix!: Rename `runner` to `webExt` (#1180)
aklinker1 Nov 16, 2024
ed3b922
fix!: Remove `transformManfiest` option (#1181)
aklinker1 Nov 16, 2024
10ff342
fix: Remove unnecessary `VITE_CJS_IGNORE_WARNING` flag
aklinker1 Nov 16, 2024
25c61fe
chore: Fix type errors
aklinker1 Nov 28, 2024
aee4af6
fix!: Make `publicDir` and `modulesDir` relative to project root (#1216)
aklinker1 Nov 28, 2024
ee52445
docs: Fix public path reference
aklinker1 Dec 29, 2024
9f45f16
docs: Add blog and first blog post to wxt.dev (#1261)
aklinker1 Dec 8, 2024
29026ef
feat!: Individual exports and introduce the `#imports` module (#1258)
aklinker1 Dec 11, 2024
df87690
fix: Add support for WXT v0.20.0
aklinker1 Dec 29, 2024
9b26569
fix!: Update min WXT version to 0.20
aklinker1 Mar 21, 2025
b0c80e0
chore: Remove duplicate test
aklinker1 Dec 11, 2024
1b5f368
feat!: Reset inherited styles inside shadow root (#1269)
aklinker1 Dec 11, 2024
006af50
docs: Fix broken links
aklinker1 Dec 11, 2024
e81e275
fix!: Move `wxt/storage` to `wxt/utils/storage` (#1271)
aklinker1 Dec 12, 2024
3122270
docs: Fix api reference for `wxt/utils/storage`
aklinker1 Dec 12, 2024
fc65da5
docs: Add upgrade guide for v0.20 (#1270)
aklinker1 Dec 26, 2024
5835c4b
feat: Add `@wxt-dev/webextension-polyfill` module (#1310)
aklinker1 Dec 28, 2024
feeb4de
fix: Add back `ExtensionRunnerConfig` as deprecated (#1311)
aklinker1 Dec 28, 2024
0bcdc0b
docs: Update upgrade guide
aklinker1 Dec 29, 2024
43859bd
feat!: Auto-import types (#1315)
aklinker1 Dec 30, 2024
000f437
fix: missing browser in shadow-root file (#1317)
1natsu172 Dec 31, 2024
d7701d2
docs: Update configurable directories in `project-structure.md`
aklinker1 Jan 6, 2025
d1e37f5
docs: Update modules path to new path
aklinker1 Jan 6, 2025
92c6556
docs: Fix broken links
aklinker1 Mar 21, 2025
c7b655d
docs: Update v0.20 upgrade docs
aklinker1 Mar 21, 2025
3a0ce28
chore: Remove `@types/chrome` from project templates
aklinker1 Mar 28, 2025
3a59621
docs: Final changes to 0.20 upgrade guide
aklinker1 Mar 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- module-vue
- storage
- unocss
- webextension-polyfill
- wxt

permissions:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sync-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- module-svelte
- module-vue
- storage
- webextension-polyfill
- wxt

permissions:
Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,13 @@ npm i https://pkg.pr.new/@wxt-dev/module-react@main
# Install `@wxt-dev/storage` from a specific commit:
npm i https://pkg.pr.new/@wxt-dev/module-react@426f907
```

## Blog Posts

Anyone is welcome to submit a blog post on https://wxt.dev/blog!

> [!NOTE]
> Before starting on a blog post, please message Aaron on Discord or start a discussion on GitHub to get permission to write about a topic, but most topics are welcome: Major version updates, tutorials, etc.

- **English only**: Blog posts should be written in English. Unfortunately, our maintainers doesn't have the bandwidth right now to translate our docs, let alone blog posts. Sorry 😓
- **AI**: Please only use AI to translate or proof-read your blog post. Don't generate the whole thing... We don't want to publish that.
70 changes: 70 additions & 0 deletions docs/.vitepress/components/BlogHome.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<script lang="ts" setup>
import { computed } from 'vue';
// @ts-expect-error: Vitepress data-loader magic, this import is correct
import { data } from '../loaders/blog.data';
import BlogPostPreview from './BlogPostPreview.vue';

const posts = computed(() =>
data
.map((post) => ({
...post,
...post.frontmatter,
date: new Date(post.frontmatter.date),
}))
.sort((a, b) => b.date.getTime() - a.date.getTime()),
);
</script>

<template>
<div class="container">
<div>
<div class="vp-doc">
<h1>Blog</h1>
</div>

<ul>
<BlogPostPreview v-for="post of posts" :key="post.url" :post />
</ul>
</div>
</div>
</template>

<style scoped>
.container {
display: flex;
flex-direction: column;
align-items: center;
}
.container > div {
padding: 32px;
max-width: 900px;
width: 100%;
min-width: 0;
}

h1 {
padding-bottom: 16px;
}

ul {
display: flex;
flex-direction: column;
list-style: none;
}
ul,
li {
padding: 0;
margin: 0;
}

ul li {
padding-top: 16px;
margin-top: 16px;
border-top: 1px solid var(--vp-c-default);
}
ul li:last-child {
padding-bottom: 16px;
margin-bottom: 16px;
border-bottom: 1px solid var(--vp-c-default);
}
</style>
76 changes: 76 additions & 0 deletions docs/.vitepress/components/BlogLayout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<script lang="ts" setup>
import useBlogDate from '../composables/useBlogDate';
import { useData } from 'vitepress';

const { frontmatter } = useData();
const date = useBlogDate(() => frontmatter.value.date);
</script>

<template>
<div class="vp-doc">
<main class="container-content">
<h1 v-html="$frontmatter.title" />
<p class="meta-row">
<a
class="author"
v-for="author of $frontmatter.authors"
:key="author.github"
:href="`https://github.com/${author.github}`"
>
<img :src="`https://github.com/${author.github}.png?size=96`" />
<span>{{ author.name }}</span>
</a>
<span>&bull;</span>
<span>{{ date }}</span>
</p>
<Content />
</main>
</div>
</template>

<style scoped>
vp-doc {
display: flex;
}
main {
max-width: 1080px;
padding: 32px;
margin: auto;
}
@media (min-width: 768px) {
main {
padding: 64px;
}
}
.meta-row {
display: flex;
color: var(--vp-c-text-2);
gap: 16px;
overflow: hidden;
padding-bottom: 32px;
}
.meta-row > * {
flex-shrink: 0;
}
.author {
display: flex;
gap: 8px;
align-items: center;
color: var(--vp-c-text-2);
font-weight: normal;
text-decoration: none;
}
.author img {
width: 24px;
height: 24px;
border-radius: 100%;
}
.author span {
padding: 0;
margin: 0;
}
.author:hover {
text-decoration: underline;
color: var(--vp-c-text-2);
}
</style>
72 changes: 72 additions & 0 deletions docs/.vitepress/components/BlogPostPreview.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<script lang="ts" setup>
import useBlogDate from '../composables/useBlogDate';

const props = defineProps<{
post: {
title: string;
description?: string;
date: Date;
url: string;
authors: Array<{ name: string; github: string }>;
};
}>();

const date = useBlogDate(() => props.post.date);
</script>

<template>
<li class="blog-list-item">
<a :href="post.url">
<div class="vp-doc">
<h3 class="title" v-html="post.title" />
<p class="description" v-html="post.description" />
<p class="meta">
{{ post.authors.map((author) => author.name).join(', ') }}
&bull;
{{ date }}
</p>
</div>
</a>
</li>
</template>

<style scoped>
li {
padding: 0;
margin: 0;
}

p {
margin: 0;
}
h3 {
margin: 0;
padding: 0;
border: none;
}

li > a > div {
display: flex;
flex-direction: column;
margin: 0 -16px;
padding: 16px;
border-radius: 16px;
}
li > a > div:hover {
background: var(--vp-c-default);
}
li .title {
color: var(--vp-c-text);
margin-bottom: 12px;
}
li .description {
font-size: 16px;
color: var(--vp-c-text-2);
margin-bottom: 8px;
}
li .meta {
font-weight: 400;
font-size: 12px;
color: var(--vp-c-text-2);
}
</style>
15 changes: 15 additions & 0 deletions docs/.vitepress/composables/useBlogDate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { computed, toValue, MaybeRefOrGetter } from 'vue';

const MONTH_FORMATTER = new Intl.DateTimeFormat(
globalThis?.navigator?.language,
{
month: 'long',
},
);

export default function (date: MaybeRefOrGetter<Date | string>) {
return computed(() => {
const d = new Date(toValue(date));
return `${MONTH_FORMATTER.format(d)} ${d.getDate()}, ${d.getFullYear()}`;
});
}
35 changes: 32 additions & 3 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@ import {
groupIconVitePlugin,
localIconLoader,
} from 'vitepress-plugin-group-icons';
import { Feed } from 'feed';
import { writeFile } from 'node:fs/promises';
import { join } from 'node:path';

const origin = 'https://wxt.dev';

const title = 'Next-gen Web Extension Framework';
const titleSuffix = ' – WXT';
const description =
"WXT provides the best developer experience, making it quick, easy, and fun to develop web extensions. With built-in utilities for building, zipping, and publishing your extension, it's easy to get started.";
const ogTitle = `${title}${titleSuffix}`;
const ogUrl = 'https://wxt.dev';
const ogImage = 'https://wxt.dev/social-preview.png';
const ogUrl = origin;
const ogImage = `${origin}/social-preview.png`;

const otherPackages = {
analytics: analyticsVersion,
Expand Down Expand Up @@ -69,7 +74,30 @@ export default defineConfig({
},
lastUpdated: true,
sitemap: {
hostname: 'https://wxt.dev',
hostname: origin,
},

async buildEnd(site) {
// Only construct the RSS document for production builds
const { default: blogDataLoader } = await import('./loaders/blog.data');
const posts = await blogDataLoader.load();
const feed = new Feed({
copyright: 'MIT',
id: 'wxt',
title: 'WXT Blog',
link: `${origin}/blog`,
});
posts.forEach((post) => {
feed.addItem({
date: post.frontmatter.date,
link: new URL(post.url, origin).href,
title: post.frontmatter.title,
description: post.frontmatter.description,
});
});
console.log('rss.xml:');
console.log(feed.rss2());
await writeFile(join(site.outDir, 'rss.xml'), feed.rss2(), 'utf8');
},

head: [
Expand Down Expand Up @@ -126,6 +154,7 @@ export default defineConfig({
navItem('Guide', '/guide/installation'),
navItem('Examples', '/examples'),
navItem('API', '/api/reference/wxt'),
navItem('Blog', '/blog'),
navItem(`v${wxtVersion}`, [
navItem('wxt', [
navItem(`v${wxtVersion}`, '/'),
Expand Down
3 changes: 3 additions & 0 deletions docs/.vitepress/loaders/blog.data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createContentLoader } from 'vitepress';

export default createContentLoader('blog/*.md');
11 changes: 7 additions & 4 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ import Icon from '../components/Icon.vue';
import EntrypointPatterns from '../components/EntrypointPatterns.vue';
import UsingWxtSection from '../components/UsingWxtSection.vue';
import ExampleSearch from '../components/ExampleSearch.vue';
import BlogLayout from '../components/BlogLayout.vue';
import './custom.css';
import 'virtual:group-icons.css';

export default {
extends: DefaultTheme,
enhanceApp(ctx) {
ctx.app.component('Icon', Icon);
ctx.app.component('EntrypointPatterns', EntrypointPatterns);
ctx.app.component('UsingWxtSection', UsingWxtSection);
ctx.app.component('ExampleSearch', ExampleSearch);
ctx.app
.component('Icon', Icon)
.component('EntrypointPatterns', EntrypointPatterns)
.component('UsingWxtSection', UsingWxtSection)
.component('ExampleSearch', ExampleSearch)
.component('blog', BlogLayout);
},
};
9 changes: 9 additions & 0 deletions docs/blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: page
---

<script lang="ts" setup>
import BlogHome from './.vitepress/components/BlogHome.vue';
</script>

<BlogHome />
12 changes: 12 additions & 0 deletions docs/blog/.drafts/2024-10-19-real-world-messaging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: blog
title: Real World Messaging
description: |
The extension messaging APIs are difficult to learn. Let's go beyond the simple examples from Chrome and Firefox's documentation to build our own simple messaging system from scratch.
authors:
- name: Aaron Klinker
github: aklinker1
date: 2024-10-20T04:54:23.601Z
---

Test content **bold** _italic_
Loading
Loading