Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/purple-chefs-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'preact-cli': patch
---

Corrects 'build --json' ouput location and 'apple-touch-icon' will respect the publicPath automatically
2 changes: 1 addition & 1 deletion packages/cli/lib/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async function command(src, argv) {
let stats = await runWebpack(argv, false);

if (argv.json) {
await runWebpack.writeJsonStats(stats);
await runWebpack.writeJsonStats(cwd, stats);
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/lib/lib/webpack/run-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ function showStats(stats, isProd) {
return stats;
}

function writeJsonStats(stats) {
let outputPath = resolve(process.cwd(), 'stats.json');
function writeJsonStats(cwd, stats) {
let outputPath = resolve(cwd, 'stats.json');
let jsonStats = stats.toJson({
json: true,
chunkModules: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/lib/resources/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="/assets/icons/apple-touch-icon.png">
<link rel="apple-touch-icon" href="<%= htmlWebpackPlugin.files.publicPath %>assets/icons/apple-touch-icon.png">
<% preact.headEnd %>
</head>
<body>
Expand Down
Loading