Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b5a9d8082d | |||
| 371be99770 | |||
| 09928e8a15 | |||
| 0a26673172 | |||
| 68611ae944 | |||
| 49965e7786 | |||
| fa2b6566d8 | |||
| 2d1c41eff1 |
@@ -2,3 +2,5 @@
|
||||
coverage
|
||||
dist
|
||||
e2e/project
|
||||
.wxt
|
||||
docs/.vitepress/cache
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
@@ -100,6 +100,7 @@ async function writeMainDeclarationFile(
|
||||
filePath,
|
||||
[
|
||||
'// Generated by wxt',
|
||||
`/// <reference types="vite/client" />`,
|
||||
...references.map(
|
||||
(ref) => `/// <reference types="./${relative(dir, ref)}" />`,
|
||||
),
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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),
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user