Title no longer settable in webpack.config.js

I have created a new aurelia app today using cli 2.0.2 and looking into the webpack.config.js , the title variable is no longer settable there. the index.ejs has also changed to hardcoded string. Is there a reason this has changed?

webpack.config.js

// primary config:
const outDir = path.resolve(__dirname, project.platform.output);
const srcDir = path.resolve(__dirname, 'src');
const baseUrl = '';

index.ejs

<meta charset="utf-8">
<title>Aurelia Navigation Skeleton</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

Thank you

1 Like

because it is only used in the title in the html.
there is no point in setting it as a variable there and pass it around to the html.
am I missing something?

you can always create it as a variable if this is what you need.
but is this relevant for all users? and should be there by default?

1 Like

is there a github ticket for this decision somewhere? I could not find anything… just wandered what was the community reasoning. thanks.

1 Like

emm, no - and it’s my fault.
while I was fixing an issue regarding serving a webpack bundle from a non-root path on the server, I also tried to simplify the webpack configuration. and I committed this work together.

is there a benefit in having the title set in webpack config?
I understand that you probably interested in manipulating the title based on the current environment?
you are right in that I should not have changed this without talking about it first.
sorry for that.

1 Like

for me there was a benefit as I could read a version of app from package.json and stick it to title.

const title = 'Super cool app @ Evil co. v' + require("./package.json").version;

but I have added it without problems, just wondered really if there was a performace benefit or something … only being curious (or pain in a neck :slight_smile: ) thats all. thank you!

1 Like

is this really helpful though?
a long title gets truncated by the browser, and that even before the router adds the current route to the mix…
we also do this kind of stuff, but display the data as a small footer in the app…

1 Like