Commit 70d611f0 authored by JJ Kasper's avatar JJ Kasper Committed by Tim Neutkens

Update with-hashed-statics example (#6472)

Fixes: https://github.com/zeit/now-builders/issues/160
parent 227ea575
Some cool text
\ No newline at end of file
...@@ -7,7 +7,8 @@ module.exports = { ...@@ -7,7 +7,8 @@ module.exports = {
loader: 'file-loader', loader: 'file-loader',
options: { options: {
context: '', context: '',
emitFile: true, outputPath: 'static',
publicPath: '_next/static',
name: '[path][name].[hash].[ext]' name: '[path][name].[hash].[ext]'
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next" "start": "next start"
}, },
"dependencies": { "dependencies": {
"babel-plugin-transform-assets": "^0.2.0", "babel-plugin-transform-assets": "^0.2.0",
......
// We need to use `require` instead of `import` import logoSVG from '../assets/images/logo.svg'
// They also must be assigned to a variable/constant import logoPNG from '../assets/images/logo.png'
const logoSVG = require('../static/images/logo.svg') import txt from '../assets/file.txt'
const logoPNG = require('../static/images/logo.png')
const txt = require('../static/file.txt')
export default () => ( export default () => (
<div> <div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment