Open lyquocnam opened 7 years ago
I can confirm:
Steps to reproduce [on Windows 10]:
reherh`ERROR` Failed to compile with 1 errors 8:24:20 AM
error in ./resources/assets/img/logo.png
Module parse failed: C:\Users\Hadi\tut\resources\assets\img\logo.png Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./~/vue-loader/lib/template-compiler?{"id":"data-v-7d49fb04","preserveWhitespace":false}!./~/vue-loader/lib/selector.js?type=template&index=0!./resources/layouts/error.vue 6:13-46
@ ./resources/layouts/error.vue
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi webpack-hot-middleware/client?reload=true ./.nuxt/client.js
Any solution?
in config/nuxt.js add:
build: {
loaders: [
{
test: /\.(png|jpe?g|gif|svg)$/,
loader: 'url-loader',
query: {
limit: 10000, // 10KO
name: 'img/[name].[hash].[ext]'
}
}
]
}
@ vizo: your solution worked for my problem as well. Only the startpage is still messed up. Do you have an idea? " TypeError (intermediate value).then is not a function "
thx.
are you missing a semicolon anywhere?
@jzucadi I only added the solution from issue #45 to config/nuxt.js
Next try ------ I just started 3rd adonuxt template (followed the steps...)
thx. for any help ;-)
@elboerse change
this.nuxt = new Nuxt(config)
.then((nuxt) => {
this.nuxt = nuxt
if (config.dev) {
this.nuxt.build()
}
})
to
this.nuxt = new Nuxt(config)
if (config.dev) {
this.nuxt.build()
}
@sayawan many thx. It worked for me. Now I can start exploring.... 👍
FYI, I had to do suggested changes from both vizo AND sayawan to get the out-of-the-box template rendering.