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
531 B
JavaScript

// We need to use `require` instead of `import`
// They also must be assigned to a variable/constant
const logoSVG = require('../static/images/logo.svg')
const logoPNG = require('../static/images/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>
)