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
Sergio Xalambrí e13bb3f62f Example: hashed statics (#2891)
* Add hashed statics example

* Fix linting
2017-09-02 00:35:45 +02:00

20 lines
517 B
JavaScript

// 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>
)