saltyshiomix / nuxtron

⚡ Nuxt.js + Electron ⚡
https://npm.im/nuxtron
MIT License
216 stars 12 forks source link

Javascript doesn't seems work on BUILD #1

Open t1gu1 opened 5 years ago

t1gu1 commented 5 years ago

Everything seems on npm run dev but not on a npm run build.

Its not reactive. Errors not showing & UI break a bit. (I just change primary color for test). Radio button doesn't works too.

Really seems like javascript doesn't works or maybe the font isn't imported correctly and it crash the app.

Take a look: image


I'm on windows 10 Using Element-UI template (I've test with vuetify and it's the same thing) Node 10.15.1 Npm 6.4.1

t1gu1 commented 5 years ago

In the next.config.js it's write:

/*

** Global CSS

*/

css: [

'../node_modules/element-ui/lib/theme-chalk/index.css'

]

As you see font is take directly in the node_module.

Maybe this part don't pass on the build?

t1gu1 commented 5 years ago

Hmm...

When I open the generated file in my browser, it's exactly like the build

image

image

image

image

saltyshiomix commented 5 years ago

@t1gu1

Thank you for your testing nuxtron.

Electron handles files by file protocol when production build, so we must resolve all paths that are different from development mode.

At this time, it may be font path problem written in css.

Anyway, I'll investigate this at this weekend :)

saltyshiomix commented 5 years ago

@t1gu1

Sorry, I'm busy at work and I don't investigate it, yet 😭 I do try to solve this problem, next time for sure, this weekend 👍

By the way, I love windows 10, too :)