Skip to content

Commit

Permalink
reproduction
Browse files Browse the repository at this point in the history
  • Loading branch information
amk221 committed Jan 24, 2024
1 parent e99f6e1 commit 47a91f2
Show file tree
Hide file tree
Showing 9 changed files with 4,741 additions and 2,147 deletions.
7 changes: 7 additions & 0 deletions app/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@font-face {
font-family: InterVariable;
src: url("./assets/fonts/InterVariable.woff2") format("woff2");
font-weight: 1 999;
font-style: normal;
font-display: swap;
}
2 changes: 2 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'example/config/environment';
import 'example/app.css';
import 'example/assets/fonts/InterVariable.woff2';

export default class App extends Application {
modulePrefix = config.modulePrefix;
Expand Down
Binary file added app/assets/fonts/InterVariable.woff2
Binary file not shown.
20 changes: 14 additions & 6 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta charset="utf-8" />
<title>Example</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

{{content-for "head"}}

<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/example.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" />
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/example.css" />

<link
rel="preload"
href="{{rootURL}}assets/InterVariable.woff2"
as="font"
type="font/woff2"
crossorigin="anonymous"
/>

{{content-for "head-footer"}}
</head>
Expand Down
2 changes: 1 addition & 1 deletion app/styles/app.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* Ember supports plain CSS out of the box. More info: https://cli.emberjs.com/release/advanced-use/stylesheets/ */
/* see app/app.css */
8 changes: 1 addition & 7 deletions app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
{{page-title "Example"}}

{{! The following component displays Ember's default welcome message. }}
<WelcomePage />
{{! Feel free to remove this! }}

{{outlet}}
<h1 style="font-family: InterVariable">Hello World</h1>
27 changes: 26 additions & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,30 @@ module.exports = function (defaults) {
// Add options here
});

return app.toTree();
const { Webpack } = require('@embroider/webpack');
return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
// staticHelpers: true,
// staticModifiers: true,
// staticComponents: true,
staticEmberSource: true,
packagerOptions: {
// Toggle this to show xyz is NOT used on the woff2 link tag in index.html
// publicAssetURL: 'xyz/',
webpackConfig: {
module: {
rules: [
{
test: /\.woff2$/i,
type: 'asset/resource',
generator: {
filename: '[path][name]-[hash][ext][query]',
},
},
],
},
},
},
});
};
Loading

0 comments on commit 47a91f2

Please sign in to comment.