mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-06 23:50:16 +02:00
c424e25d57
Install @sentry/browser via AssetMapper and initialize the feedback integration on all backoffice pages. The CDN loader script is moved to an overridable block so backoffice pages use the npm SDK without double-initialising Sentry. Sentry is initialised only when a DSN is configured (SENTRY_DSN env var). When a user is logged in their email is pre-filled in the feedback form via Sentry.setUser(); both name and email remain optional so anonymous submissions are supported by simply leaving those fields empty.
45 lines
2.0 KiB
PHP
45 lines
2.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Returns the importmap for this application.
|
|
*
|
|
* - "path" is a path inside the asset mapper system. Use the
|
|
* "debug:asset-map" command to see the full list of paths.
|
|
*
|
|
* - "entrypoint" (JavaScript only) set to true for any module that will
|
|
* be used as an "entrypoint" (and passed to the importmap() Twig function).
|
|
*
|
|
* The "importmap:require" command can be used to add new entries to this file.
|
|
*
|
|
* @return array<string, array{ // Import name as key, description of the imported file as value
|
|
* path: string, // Logical, relative or absolute path to the file
|
|
* type?: 'js'|'css'|'json', // Type of the file, defaults to 'js'
|
|
* entrypoint?: bool, // Whether the file is an entrypoint, for 'js' only
|
|
* }|array{
|
|
* version: string, // Version of the remote package
|
|
* package_specifier?: string, // Remote "package-name/path" specifier, defaults to the import name
|
|
* type?: 'js'|'css'|'json',
|
|
* entrypoint?: bool,
|
|
* }>
|
|
*/
|
|
return [
|
|
'quiz' => ['path' => './assets/quiz.js', 'entrypoint' => true],
|
|
'backoffice' => ['path' => './assets/backoffice.js', 'entrypoint' => true],
|
|
'@symfony/stimulus-bundle' => ['path' => './vendor/symfony/stimulus-bundle/assets/dist/loader.js'],
|
|
'bootstrap' => ['version' => '5.3.8'],
|
|
'@popperjs/core' => ['version' => '2.11.8'],
|
|
'bootstrap/dist/css/bootstrap.min.css' => ['version' => '5.3.8', 'type' => 'css'],
|
|
'@hotwired/stimulus' => ['version' => '3.2.2'],
|
|
'@hotwired/turbo' => ['version' => '8.0.23'],
|
|
'bootstrap-icons/font/bootstrap-icons.min.css' => ['version' => '1.13.1', 'type' => 'css'],
|
|
'@sentry/browser' => ['version' => '10.63.0'],
|
|
'@sentry/feedback' => ['version' => '10.63.0'],
|
|
'@sentry/core/browser' => ['version' => '10.63.0'],
|
|
'@sentry/browser-utils' => ['version' => '10.63.0'],
|
|
'@sentry/replay' => ['version' => '10.63.0'],
|
|
'@sentry/replay-canvas' => ['version' => '10.63.0'],
|
|
'@sentry/core' => ['version' => '10.63.0'],
|
|
];
|