Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New option to disable the vue template compiler #6965

Merged
merged 9 commits into from
Feb 7, 2025

Conversation

bastianallgeier
Copy link
Member

@bastianallgeier bastianallgeier commented Jan 30, 2025

Summary of changes

  • A new vue.runtime.js is added to the dist folder and loaded on demand when the compiler is disabled
  • A new config option (see below) is used in the Assets class to load the right file
  • An info box is shown in lab examples if the compiler is disabled. Lab examples can no longer be displayed
  • A new security warning has been added to the system view when the compiler is active. This might need to be less aggressive.

Todos

Changelog

Enhancements

  • The Vue template compiler can be switched off in the config. This will load the vue runtime version. Plugins and the lab views that rely on the template compiler will no longer work.
// `/site/config/config.php`
return [
  'panel' => [
    'vue' => [
      'compiler' => false
    ]
  ]
]

@bastianallgeier
Copy link
Member Author

I've had a closer look at the coverage and I really think it's another issue from Codecov. The lines are all covered.

distantnative
distantnative previously approved these changes Feb 4, 2025
Copy link
Member

@lukasbestle lukasbestle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About coverage: Probably rather than a Codecov issue, this is another PHPUnit issue where the method name cannot be marked as covered. We had that a lot, so I wouldn't be surprised if the name js is also affected. Nothing to worry about IMO.

config/areas/system/views.php Outdated Show resolved Hide resolved
i18n/translations/en.json Show resolved Hide resolved
@distantnative
Copy link
Member

It seems almost as if short methods are the problem (js, vue, url...). And if we say Codecov we mean PHPunit... just the coverage part of our CI overall getting it wrong.

@lukasbestle
Copy link
Member

Short names could indeed be a connection!

@distantnative distantnative force-pushed the feature/no-template-compiler branch from da766cb to c240bcc Compare February 7, 2025 11:33
@bastianallgeier
Copy link
Member Author

@distantnative the themes are great!

@bastianallgeier bastianallgeier merged commit 5879249 into develop-minor Feb 7, 2025
16 of 17 checks passed
@bastianallgeier bastianallgeier deleted the feature/no-template-compiler branch February 7, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants