File tree Expand file tree Collapse file tree 6 files changed +36
-13
lines changed
qwik/src/optimizer/src/plugins Expand file tree Collapse file tree 6 files changed +36
-13
lines changed Original file line number Diff line number Diff line change @@ -592,7 +592,13 @@ jobs:
592
592
test-unit :
593
593
name : Unit Tests
594
594
if : always() && needs.changes.outputs.build-unit == 'true'
595
- runs-on : ubuntu-latest
595
+ strategy :
596
+ matrix :
597
+ settings :
598
+ - host : ubuntu-latest
599
+ - host : windows-latest
600
+
601
+ runs-on : ${{ matrix.settings.host }}
596
602
needs :
597
603
- changes
598
604
- build-other-packages
Original file line number Diff line number Diff line change 22
22
"@types/density-clustering" : " 1.3.3" ,
23
23
"@types/node" : " 24.0.4" ,
24
24
"autoprefixer" : " 10.4.19" ,
25
- "better-sqlite3" : " 9.6 .0" ,
25
+ "better-sqlite3" : " 12.2 .0" ,
26
26
"eslint" : " 9.25.1" ,
27
27
"eslint-plugin-qwik" : " workspace:*" ,
28
28
"globals" : " 16.0.0" ,
Original file line number Diff line number Diff line change @@ -242,10 +242,10 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
242
242
// we only provide inputs if none were provided by the user
243
243
if ( opts . target === 'ssr' ) {
244
244
// this is for dev mode, prod will have own setting
245
- opts . input = [ path . resolve ( srcDir , 'entry.ssr' ) ] ;
245
+ opts . input = [ normalizePath ( path . resolve ( srcDir , 'entry.ssr' ) ) ] ;
246
246
} else if ( opts . target === 'client' ) {
247
247
// not really an entry, just a starting point
248
- opts . input = [ path . resolve ( srcDir , 'root' ) ] ;
248
+ opts . input = [ normalizePath ( path . resolve ( srcDir , 'root' ) ) ] ;
249
249
} else {
250
250
// others including lib should be ok already
251
251
opts . input = undefined ! ;
@@ -390,6 +390,10 @@ export function createQwikPlugin(optimizerOptions: OptimizerOptions = {}) {
390
390
if ( opts . input && typeof opts . input === 'string' ) {
391
391
opts . input = [ opts . input ] ;
392
392
}
393
+ // Normalize input paths to ensure consistent path separators across platforms
394
+ if ( opts . input && Array . isArray ( opts . input ) ) {
395
+ opts . input = opts . input . map ( ( input ) => normalizePath ( input ) ) ;
396
+ }
393
397
return out ;
394
398
} ;
395
399
Original file line number Diff line number Diff line change @@ -170,7 +170,9 @@ const getChunkFileName = (
170
170
// The chunk name can often be a path. We sanitize it to use dashes instead of slashes, to keep the same folder structure as without debug:true.
171
171
// Besides, Rollup doesn't accept absolute or relative paths as inputs for the [name] placeholder for the same reason.
172
172
const relativePath = optimizer . sys . path . relative ( optimizer . sys . cwd ( ) , chunkInfo . name ) ;
173
- const sanitized = relativePath
173
+ // Normalize path separators to forward slashes before sanitizing
174
+ const normalizedPath = relativePath . replace ( / \\ / g, '/' ) ;
175
+ const sanitized = normalizedPath
174
176
. replace ( / ^ ( \. \. \/ ) + / , '' )
175
177
. replace ( / ^ \/ + / , '' )
176
178
. replace ( / \/ / g, '-' ) ;
Original file line number Diff line number Diff line change @@ -183,6 +183,16 @@ export function qwikVite(qwikViteOpts: QwikVitePluginOptions = {}): any {
183
183
const opts = await qwikPlugin . normalizeOptions ( pluginOpts ) ;
184
184
input ||= opts . input ;
185
185
186
+ // Normalize input paths to ensure consistent path separators across platforms
187
+ if ( input && Array . isArray ( input ) ) {
188
+ input = input . map ( ( inputPath ) => {
189
+ // Preserve relative path prefixes (./) while normalizing separators
190
+ const isRelative = inputPath . startsWith ( './' ) ;
191
+ const normalized = qwikPlugin . normalizePath ( inputPath ) ;
192
+ return isRelative && ! normalized . startsWith ( './' ) ? `./${ normalized } ` : normalized ;
193
+ } ) ;
194
+ }
195
+
186
196
manifestInput = opts . manifestInput ;
187
197
srcDir = opts . srcDir ;
188
198
rootDir = opts . rootDir ;
You can’t perform that action at this time.
0 commit comments