Last active
June 12, 2018 17:01
-
-
Save cjus/21f9db7f1b924f0c24d4e7bc6360a573 to your computer and use it in GitHub Desktop.
Fixup file for Preact build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
const packageJson = require('./package.json'); | |
let filePath = path.join(__dirname, '/build/index.html'); | |
let html = fs.readFileSync(filePath, 'utf8'); | |
html = html.replace('<head>', `<head><base href="${packageJson.homepage}">`); | |
fs.writeFileSync('build/index.html', html); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment