File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 2.2.2 (2023-09-15)
2+
3+ - da22d3e fix: relative path calc on Windows [ #13 ] ( https://github.com/vite-plugin/vite-plugin-native/issues/13 )
4+
15## 2.2.1 (2023-06-29)
26
37- 548fedb fix: avoid Vite built-in alias
Original file line number Diff line number Diff line change 11{
22 "name" : " vite-plugin-native" ,
3- "version" : " 2.2.1 " ,
3+ "version" : " 2.2.2 " ,
44 "description" : " Supports Node/Electron C/C++ native addons" ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -97,8 +97,8 @@ export default function native(options: NativeOptions): Plugin {
9797 return
9898 }
9999
100- const nativeFilename = path . join ( output , source + NativeExt )
101- const interopFilename = path . join ( output , source + InteropExt )
100+ const nativeFilename = path . posix . join ( output , source + NativeExt )
101+ const interopFilename = path . posix . join ( output , source + InteropExt )
102102
103103 if ( ! nativesMap . get ( source ) ) {
104104 ensureDir ( path . dirname ( interopFilename ) )
@@ -279,7 +279,7 @@ async function forceCopyNativeFilesIfUnbuilt(
279279 . some ( ( file ) => fs . existsSync ( path . join ( nativeOutput , file ) ) )
280280
281281 if ( ! exists ) {
282- const nativeDest = path . join ( nativeNodeModules , nativeName )
282+ const nativeDest = path . posix . join ( nativeNodeModules , nativeName )
283283 copy ( nativeRoot , nativeDest )
284284
285285 const dependencies = await flatDependencies ( nativeRoot )
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export async function getDependenciesNatives(root = process.cwd()): Promise<Map<
6262 for ( const dep of deps ) {
6363 if ( natives . has ( dep ) ) continue
6464
65- const depPath = path . join ( node_modules_path , dep )
65+ const depPath = path . posix . join ( node_modules_path , dep )
6666 const nativeFiles = await globNativeFiles ( depPath )
6767
6868 if ( nativeFiles . length ) {
You can’t perform that action at this time.
0 commit comments