wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.34k stars 1.22k forks source link

app.css deleted during wails build on windows 10, wails vue app #462

Closed nielsGal closed 4 years ago

nielsGal commented 4 years ago

Description

frontend/dist/app.css is deleted by wails CLI on both init and on build, this is file is required for building an app. Currently I can manage to build only if I quickly put a copy of app.css back in the dist folder during the wails build process.

To Reproduce Steps to reproduce the behaviour: wails build

Expected behaviour a normal build without deleting the app.css

Screenshots If applicable, add screenshots to help explain your problem.

System Details

Name Value
Wails Version v1.7.1
Go Version go1.14.4
Platform windows
Arch amd64
GO111MODULE (Not Set)
GCC 9.2.0
Npm 6.13.4
Node v12.14.1

vue js app of wails (option 4)

Additional context

leaanthony commented 4 years ago

Do you have a sample project showing this? This is not default behaviour. It sounds like webpack isn't copying the file over.

nielsGal commented 4 years ago

yes, i tried the CPU stats from the tutorial on your website. This is what i get just running wails build, when calling wails build app.css exists inside of the dist folder and it's in the repo

https://github.com/nielsGal/wails

i added the dist folder as well which is untracked by defualt locally it looks something like this.

image

image

image

bt the time the CLI prints Building frontend...

app.css is deleted

leaanthony commented 4 years ago

Thanks, I'll check it as soon as I can.

leaanthony commented 4 years ago

Just created a new project, used template 4, opened project in vsc: image

Working as expected.

leaanthony commented 4 years ago

If you needed to create a dist folder then I expect something is wrong with your webpack config. Which would also account for the css file being deleted.

leaanthony commented 4 years ago

@nielsGal - any feedback on this?

leaanthony commented 4 years ago

Closing due to inactivity.

ghost commented 4 years ago

I have the same problem.

I use the Template: Vue2/Webpack Basic and modify nothing in vue.config.js file, just run cmd vue add vuetify and wails build, it's say Error: open C:\work\code\go\goRedisManage\goredismanage\frontend\dist\app.css: The system cannot find the file specified

I just view the vue.config.js file and found that the file had been changed. Vuetify plugin would modify vue.config.js.

Maybe beginners like to do it by themselves, and don't like to use the template that they already have (Vuetify2/Webpack Basic or Vuetify1.5/Webpack Basic).

leaanthony commented 4 years ago

Would love to know what's deleting that.