Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix build on windows by using posix to achieve unix paths (#3)

authored by

Jovi De Croock and committed by
GitHub
30bbb9d1 4b422573

+13 -11
+13 -11
scripts/rollup/config.js
··· 14 14 import { packageMetadata, version } from './packageMetadata'; 15 15 16 16 const cwd = process.cwd(); 17 - const graphqlModule = path.join(cwd, 'node_modules/graphql/'); 18 - const virtualModule = path.join(cwd, 'virtual/'); 19 - const aliasModule = path.join(cwd, 'alias/'); 17 + const graphqlModule = path.posix.join(cwd, 'node_modules/graphql/'); 18 + const virtualModule = path.posix.join(cwd, 'virtual/'); 19 + const aliasModule = path.posix.join(cwd, 'alias/'); 20 20 21 21 const EXTERNAL = 'graphql'; 22 22 const externalModules = ['dns', 'fs', 'path', 'url']; ··· 65 65 66 66 export default { 67 67 input: Object.keys(exports).reduce((input, key) => { 68 - input[key] = path.join('./virtual', key); 68 + input[key] = path.posix.join('./virtual', key); 69 69 return input; 70 70 }, {}), 71 71 external(id) { ··· 80 80 { 81 81 async load(id) { 82 82 if (!id.startsWith(virtualModule)) return null; 83 - const entry = path.relative(virtualModule, id).replace(/\.m?js$/, ''); 83 + const entry = path.posix 84 + .relative(virtualModule, id) 85 + .replace(/\.m?js$/, ''); 84 86 if (entry === 'version') return version; 85 87 return exports[entry] || null; 86 88 }, ··· 89 91 if (!source.startsWith('.') && !source.startsWith('virtual/')) 90 92 return null; 91 93 92 - const target = path.join( 93 - importer ? path.dirname(importer) : cwd, 94 + const target = path.posix.join( 95 + importer ? path.posix.dirname(importer) : cwd, 94 96 source 95 97 ); 96 98 97 - const virtualEntry = path.relative(virtualModule, target); 99 + const virtualEntry = path.posix.relative(virtualModule, target); 98 100 if (!virtualEntry.startsWith('../')) { 99 - const aliasSource = path.join(aliasModule, virtualEntry); 101 + const aliasSource = path.posix.join(aliasModule, virtualEntry); 100 102 const alias = await this.resolve(aliasSource, undefined, { 101 103 skipSelf: true, 102 104 }); 103 105 return alias || target; 104 106 } 105 107 106 - const graphqlEntry = path.relative(graphqlModule, target); 108 + const graphqlEntry = path.posix.relative(graphqlModule, target); 107 109 if (!graphqlEntry.startsWith('../')) { 108 - const aliasSource = path.join(aliasModule, graphqlEntry); 110 + const aliasSource = path.posix.join(aliasModule, graphqlEntry); 109 111 const alias = await this.resolve(aliasSource, undefined, { 110 112 skipSelf: true, 111 113 });