Skip to content

Commit

Permalink
fix: fixed nuxt preview import path on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Apr 21, 2022
1 parent 608a959 commit 49e6e27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/preview/bin/nuxi.js
Expand Up @@ -5,7 +5,7 @@ const fs = require('fs');
const readFileSync = fs.readFileSync;

const workspace = process.cwd();
const nuxiBinPath = require.resolve('./node_modules/.bin/nuxi', { paths: [workspace] });
const nuxiBinPath = require.resolve('./node_modules/nuxt3/bin/nuxt.mjs', { paths: [workspace] });
const jsConfigPath = path.resolve(workspace, 'nuxt.config.js');
const tsConfigPath = path.resolve(workspace, 'nuxt.config.ts');

Expand All @@ -18,4 +18,4 @@ fs.readFileSync = (...args) => {
return readFileSync(...args);
};

import(nuxiBinPath);
import('file://' + nuxiBinPath);

0 comments on commit 49e6e27

Please sign in to comment.