mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 22:53:50 +08:00
DEV: Update asset config for embroider (#23461)
- Add data-embroider-ignore to all script tags which are not currently being compiled by embroider - Ensure all remaining script tags are wrapped in `<discourse-chunked-script>` so that Rails will follow any renames which Embroider makes (e.g. when it adds fingerprints to filenames)
This commit is contained in:
parent
cde5dea74f
commit
894307ff0e
|
@ -21,7 +21,9 @@
|
|||
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" />
|
||||
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/discourse.css" />
|
||||
|
||||
<script defer src="{{rootURL}}assets/vendor.js"></script>
|
||||
<discourse-chunked-script entrypoint="vendor">
|
||||
<script defer src="{{rootURL}}assets/vendor.js"></script>
|
||||
</discourse-chunked-script>
|
||||
|
||||
<discourse-chunked-script entrypoint="discourse">
|
||||
<ember-auto-import-scripts defer entrypoint="app"></ember-auto-import-scripts>
|
||||
|
@ -51,7 +53,7 @@
|
|||
|
||||
<bootstrap-content key="hidden-login-form"></bootstrap-content>
|
||||
|
||||
<script defer src="{{rootURL}}assets/start-discourse.js"></script>
|
||||
<script defer src="{{rootURL}}assets/start-discourse.js" data-embroider-ignore></script>
|
||||
|
||||
<bootstrap-content key="body-footer"></bootstrap-content>
|
||||
{{content-for "body-footer"}}
|
||||
|
|
|
@ -41,14 +41,16 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<script src="{{rootURL}}assets/test-i18n.js"></script>
|
||||
<script src="{{rootURL}}assets/test-site-settings.js"></script>
|
||||
<script src="{{rootURL}}assets/test-i18n.js" data-embroider-ignore></script>
|
||||
<script src="{{rootURL}}assets/test-site-settings.js" data-embroider-ignore></script>
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}} {{content-for "test-body"}}
|
||||
|
||||
<script src="/testem.js" integrity="" data-embroider-ignore></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<discourse-chunked-script entrypoint="vendor">
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
</discourse-chunked-script>
|
||||
|
||||
<discourse-chunked-script entrypoint="test-support">
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
|
@ -69,8 +71,8 @@
|
|||
{{content-for "test-plugin-css"}}
|
||||
{{content-for "test-plugin-js"}}
|
||||
{{content-for "test-plugin-tests-js"}}
|
||||
<script defer src="{{rootURL}}assets/scripts/discourse-test-trigger-ember-cli-boot.js"></script>
|
||||
<script defer src="{{rootURL}}assets/scripts/discourse-boot.js"></script>
|
||||
<script defer src="{{rootURL}}assets/scripts/discourse-test-trigger-ember-cli-boot.js" data-embroider-ignore></script>
|
||||
<script defer src="{{rootURL}}assets/scripts/discourse-boot.js" data-embroider-ignore></script>
|
||||
{{content-for "body-footer"}} {{content-for "test-body-footer"}}
|
||||
</template>
|
||||
|
||||
|
@ -78,7 +80,7 @@
|
|||
</discourse-dynamic-test-js>
|
||||
|
||||
<!-- This script takes the <template>, filters plugin assets as required, then appends to discourse-dynamic-test-js -->
|
||||
<script src="{{rootURL}}assets/scripts/discourse-test-load-dynamic-js.js"></script>
|
||||
<script src="{{rootURL}}assets/scripts/discourse-test-load-dynamic-js.js" data-embroider-ignore></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue
Block a user