nuxtron icon indicating copy to clipboard operation
nuxtron copied to clipboard

Javascript doesn't seems work on BUILD

Open t1gu1 opened this issue 5 years ago • 4 comments

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 avatar Feb 20 '19 22:02 t1gu1

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 avatar Feb 21 '19 06:02 t1gu1

Hmm...

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

image

image

image

image

t1gu1 avatar Feb 21 '19 23:02 t1gu1

@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 avatar Feb 22 '19 01:02 saltyshiomix

@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 :)

saltyshiomix avatar Feb 25 '19 15:02 saltyshiomix