Compare commits

...

2 Commits

Author SHA1 Message Date
Aaron Klinker 55a03a1c9e Bump version for testing 2024-02-28 11:54:52 -06:00
Aaron Klinker d26381caea fix: Resolve the path to node_modules/wxt correctly 2024-02-28 11:53:18 -06:00
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "wxt",
"type": "module",
"version": "0.17.3",
"version": "0.17.4-alpha1",
"description": "Next gen framework for developing web extensions",
"engines": {
"node": ">=18",
+9 -1
View File
@@ -71,7 +71,7 @@ export async function resolveConfig(
inlineConfig.root ?? userConfig.root ?? process.cwd(),
);
const wxtDir = path.resolve(root, '.wxt');
const wxtModuleDir = path.resolve(root, 'node_modules/wxt');
const wxtModuleDir = resolveWxtModuleDir();
const srcDir = path.resolve(root, mergedConfig.srcDir ?? root);
const entrypointsDir = path.resolve(
srcDir,
@@ -324,3 +324,11 @@ async function getUnimportOptions(
defaultOptions,
);
}
/**
* Returns the path to `node_modules/wxt`.
*/
export function resolveWxtModuleDir() {
// require.resolve returns the wxt/dist/index file
return path.resolve(require.resolve('wxt'), '../..');
}