1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/app/background.html
Erik Marks 73a7ce9e39
Add applyLavaMoat build flag (#14583)
Adds a new flag, `--apply-lavamoat`, to the main build script. The flag controls whether LavaMoat is actually applied to the output of the build process. The flag defaults to `true`, but we explicitly set it to `false` in the `start` package script. Meanwhile, the `start:lavamoat` script is modified such that it applies LavaMoat to the build output in development mode, but it no longer runs the build process itself under LavaMoat as there aren't very compelling reasons to do so.

This change is motivated by the fact that development builds do not have their own dedicated LavaMoat policies, which causes development builds to fail since #14537. The downside of this change is that LavaMoat-related failures will not be detected when running `yarn start`. @kumavis has plans for fixing this problem in a future major version of the `@lavamoat` suite.
2022-04-29 15:56:30 -07:00

25 lines
1.1 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="./globalthis.js" type="text/javascript" charset="utf-8"></script>
<script src="./sentry-install.js" type="text/javascript" charset="utf-8"></script>
{{@if(it.applyLavaMoat)}}
<script src="./runtime-lavamoat.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown-more.js" type="text/javascript" charset="utf-8"></script>
<script src="./policy-load.js" type="text/javascript" charset="utf-8"></script>
{{#else}}
<script src="./lockdown-install.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown-run.js" type="text/javascript" charset="utf-8"></script>
<script src="./lockdown-more.js" type="text/javascript" charset="utf-8"></script>
<script src="./runtime-cjs.js" type="text/javascript" charset="utf-8"></script>
{{/if}}
{{@each(it.jsBundles) => val}}
<script src="{{val}}" type="text/javascript" charset="utf-8"></script>
{{/each}}
<script src="./chromereload.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>