Skip to content

Commit

Permalink
fix: add support for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel authored and tobias-93 committed Jul 4, 2023
1 parent 551e0e3 commit c9f8d5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Resources/webpack/FosRouting.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class FosRouting {
locale: '',
prettyPrint: false,
domain: [],
php: 'php',
};

constructor(options = {}) {
Expand Down Expand Up @@ -62,7 +63,7 @@ class FosRouting {
}
return pass;
}, []);
await execFile('bin/console', ['fos:js-routing:dump', ...args]);
await execFile(this.options.php, ['bin/console', 'fos:js-routing:dump', ...args]);
const content = await readFile(this.options.target);
await rmFile(this.options.target);
if (!prevContent || content.compare(prevContent) !== 0) {
Expand All @@ -86,7 +87,7 @@ class FosRouting {

new InjectPlugin(() => {
return 'import Routing from "fos-router";' +
'import routes from "' + this.finalTarget + '";' +
'import routes from '+JSON.stringify(this.finalTarget)+';' +
'Routing.setRoutingData(routes);';
}).apply(compiler);
}
Expand Down

0 comments on commit c9f8d5e

Please # to comment.