Compare commits

...

8 Commits

Author SHA1 Message Date
GitHub Actions b5a9d8082d chore(release): v0.1.5 2023-07-13 22:53:25 +00:00
Aaron Klinker 371be99770 fix: Include vite/client types 2023-07-13 17:36:52 -05:00
GitHub Actions 09928e8a15 chore(release): v0.1.4 2023-07-13 21:46:50 +00:00
Aaron Klinker 0a26673172 docs: Update CLI screenshot 2023-07-13 16:40:06 -05:00
Aaron Klinker 68611ae944 chore: Update prettier ignore 2023-07-13 16:37:15 -05:00
Aaron Klinker 49965e7786 fix: Fix config hook implementations for vite plugins
Turns out the returned config is merged with the user config, so we don't have to do that ourselves.
2023-07-13 16:36:39 -05:00
Aaron Klinker fa2b6566d8 fix: Fix regression where manifest was not listed first in build summary 2023-07-13 16:09:23 -05:00
Aaron 2d1c41eff1 Fix broken link in README.md 2023-07-11 17:59:01 -05:00
9 changed files with 62 additions and 29 deletions
+2
View File
@@ -2,3 +2,5 @@
coverage
dist
e2e/project
.wxt
docs/.vitepress/cache
+33
View File
@@ -1,5 +1,38 @@
# Changelog
## v0.1.5
[compare changes](https://github.com/aklinker1/wxt/compare/v0.1.4...v0.1.5)
### 🩹 Fixes
- Include `vite/client` types ([371be99](https://github.com/aklinker1/wxt/commit/371be99))
### ❤️ Contributors
- Aaron Klinker
## v0.1.4
[compare changes](https://github.com/aklinker1/wxt/compare/v0.1.3...v0.1.4)
### 🩹 Fixes
- Fix regression where manifest was not listed first in build summary ([fa2b656](https://github.com/aklinker1/wxt/commit/fa2b656))
- Fix config hook implementations for vite plugins ([49965e7](https://github.com/aklinker1/wxt/commit/49965e7))
### 📖 Documentation
- Update CLI screenshot ([0a26673](https://github.com/aklinker1/wxt/commit/0a26673))
### 🏡 Chore
- Update prettier ignore ([68611ae](https://github.com/aklinker1/wxt/commit/68611ae))
### ❤️ Contributors
- Aaron Klinker
## v0.1.3
[compare changes](https://github.com/aklinker1/wxt/compare/v0.1.2...v0.1.3)
+1 -1
View File
@@ -23,7 +23,7 @@
## Get Started
Checkout the [installation guide](https://wxtjs.dev/get-started) to get started with WXT.
Checkout the [installation guide](https://wxt.dev/get-started/installation.html) to get started with WXT.
## Contributors
Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 415 KiB

+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "wxt",
"type": "module",
"version": "0.1.3",
"version": "0.1.5",
"description": "Next gen framework for developing web extensions",
"engines": {
"node": ">=18.16.0",
+1
View File
@@ -100,6 +100,7 @@ async function writeMainDeclarationFile(
filePath,
[
'// Generated by wxt',
`/// <reference types="vite/client" />`,
...references.map(
(ref) => `/// <reference types="./${relative(dir, ref)}" />`,
),
+5 -6
View File
@@ -57,9 +57,9 @@ const CHUNK_SORT_WEIGHTS: Record<string, number> = {
};
function getChunkSortWeight(filename: string) {
return (
Object.entries(CHUNK_SORT_WEIGHTS).find(([key, value]) => {
if (filename.endsWith(key)) return value;
})?.[1] ?? DEFAULT_SORT_WEIGHT
Object.entries(CHUNK_SORT_WEIGHTS).find(([key]) =>
filename.endsWith(key),
)?.[1] ?? DEFAULT_SORT_WEIGHT
);
}
@@ -72,8 +72,7 @@ const CHUNK_COLORS: Record<string, (text: string) => string> = {
};
function getChunkColor(filename: string) {
return (
Object.entries(CHUNK_COLORS).find(([key, value]) => {
if (filename.endsWith(key)) return value;
})?.[1] ?? DEFAULT_COLOR
Object.entries(CHUNK_COLORS).find(([key]) => filename.endsWith(key))?.[1] ??
DEFAULT_COLOR
);
}
+9 -12
View File
@@ -11,20 +11,17 @@ export function devHtmlPrerender(config: InternalConfig): vite.Plugin {
return {
apply: 'build',
name: 'wxt:dev-html-prerender',
config(userConfig) {
return vite.mergeConfig(
{
resolve: {
alias: {
'@wxt/reload-html': resolve(
config.root,
'node_modules/wxt/dist/virtual-modules/reload-html.js',
),
},
config() {
return {
resolve: {
alias: {
'@wxt/reload-html': resolve(
config.root,
'node_modules/wxt/dist/virtual-modules/reload-html.js',
),
},
},
userConfig,
);
};
},
async transform(html, id) {
const server = config.server;
+10 -9
View File
@@ -7,18 +7,19 @@ import { InternalConfig } from '../types';
export function devServerGlobals(internalConfig: InternalConfig): Plugin {
return {
name: 'wxt:dev-server-globals',
config(config) {
config() {
if (internalConfig.server == null || internalConfig.command == 'build')
return;
config.define ??= {};
config.define.__DEV_SERVER_PROTOCOL__ = JSON.stringify('ws:');
config.define.__DEV_SERVER_HOSTNAME__ = JSON.stringify(
internalConfig.server.hostname,
);
config.define.__DEV_SERVER_PORT__ = JSON.stringify(
internalConfig.server.port,
);
return {
define: {
__DEV_SERVER_PROTOCOL__: JSON.stringify('ws:'),
__DEV_SERVER_HOSTNAME__: JSON.stringify(
internalConfig.server.hostname,
),
__DEV_SERVER_PORT__: JSON.stringify(internalConfig.server.port),
},
};
},
};
}