Skip to content

Commit

Permalink
Add FOSJSRouting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMilek committed Dec 5, 2022
1 parent 384fafe commit 5b1b162
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/Application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"watch": "encore dev --watch"
},
"devDependencies": {
"@sylius-ui/frontend": "^1.0"
"@sylius-ui/frontend": "^1.0",
"fos-router": "../../vendor/friendsofsymfony/jsrouting-bundle/Resources/"
}
}
3 changes: 3 additions & 0 deletions tests/Application/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path');
const Encore = require('@symfony/webpack-encore');
const FosRouting = require('fos-router/webpack/FosRouting');

const syliusBundles = path.resolve(__dirname, '../../vendor/sylius/sylius/src/Sylius/Bundle/');
const uiBundleScripts = path.resolve(syliusBundles, 'UiBundle/Resources/private/js/');
Expand Down Expand Up @@ -27,6 +28,7 @@ Encore.reset();

// Admin config
Encore
.addPlugin(new FosRouting())
.setOutputPath('public/build/admin/')
.setPublicPath('/build/admin')
.addEntry('admin-entry', '../../vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Resources/private/entry.js')
Expand Down Expand Up @@ -70,6 +72,7 @@ Encore.reset();

// App admin config
Encore
.addPlugin(new FosRouting())
.setOutputPath('public/build/app/admin')
.setPublicPath('/build/app/admin')
.addEntry('app-admin-entry', './assets/admin/entry.js')
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Resources/services/mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
->alias('sylius.behat.context.hook.mailer', 'sylius.behat.context.hook.email_spool')
->public()
;
};
};

0 comments on commit 5b1b162

Please sign in to comment.