1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-hashed-statics/pages/index.js

20 lines
517 B
JavaScript
Raw Normal View History

// We need to use `require` instead of `import`
// They also must be assigned to a variable/constant
const logoSVG = require('../static/logo.svg')
const logoPNG = require('../static/logo.png')
const txt = require('../static/file.txt')
export default () => (
<div>
<strong>{txt}</strong>
<br />
<img src={logoSVG} alt='Logo SVG' width='305' />
<br />
<strong>{logoSVG}</strong>
<br />
<img src={logoPNG} alt='Logo PNG' width='305' />
<br />
<strong>{logoPNG}</strong>
</div>
)