File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed 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
+
1
5
## 2.2.1 (2023-06-29)
2
6
3
7
- 548fedb fix: avoid Vite built-in alias
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vite-plugin-native" ,
3
- "version" : " 2.2.1 " ,
3
+ "version" : " 2.2.2 " ,
4
4
"description" : " Supports Node/Electron C/C++ native addons" ,
5
5
"main" : " ./dist/index.js" ,
6
6
"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 {
97
97
return
98
98
}
99
99
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 )
102
102
103
103
if ( ! nativesMap . get ( source ) ) {
104
104
ensureDir ( path . dirname ( interopFilename ) )
@@ -279,7 +279,7 @@ async function forceCopyNativeFilesIfUnbuilt(
279
279
. some ( ( file ) => fs . existsSync ( path . join ( nativeOutput , file ) ) )
280
280
281
281
if ( ! exists ) {
282
- const nativeDest = path . join ( nativeNodeModules , nativeName )
282
+ const nativeDest = path . posix . join ( nativeNodeModules , nativeName )
283
283
copy ( nativeRoot , nativeDest )
284
284
285
285
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<
62
62
for ( const dep of deps ) {
63
63
if ( natives . has ( dep ) ) continue
64
64
65
- const depPath = path . join ( node_modules_path , dep )
65
+ const depPath = path . posix . join ( node_modules_path , dep )
66
66
const nativeFiles = await globNativeFiles ( depPath )
67
67
68
68
if ( nativeFiles . length ) {
You can’t perform that action at this time.
0 commit comments