Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static in 'public' dir are not serve #21

Open
swasher opened this issue May 12, 2019 · 0 comments
Open

Static in 'public' dir are not serve #21

swasher opened this issue May 12, 2019 · 0 comments

Comments

@swasher
Copy link

swasher commented May 12, 2019

You setup assume static dir is '/app/dist/static'. npm build generate this dir as ordered by vue.config.js

module.exports = {
    assetsDir: 'static',
}

and flask setting up static directory as

app = Flask(__name__, static_folder='../dist/static')

But static files from public dir is one level higher - in /app/dist. So favicon.ico and other static from public are inaccessible.

image

I'm trying build my own template (inspired by yours). I trying remove static from static path. And I am faced with the fact that if set assetDir: '' (this is default), and flask static_folder='dist' (my app.py lies in root), then nothing works at all. All static include js become inaccessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant