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

通过webpack发布后在浏览器开发者模式的sources下域名目录下static/js/app.js下会显示源码 #757

Open
davidch2021 opened this issue Mar 1, 2023 · 0 comments

Comments

@davidch2021
Copy link

通过nginx--django---vue来搭建了一套环境。我的操作步骤是

  1. 通过npm run build:stage生成vue项目的static目录(其中static/js/app.js中含源码)
  2. 将vue项目的static目录下所有内容拷贝到django的项目static目录/opt/myproj/static内
  3. nginx中配置了django的static目录
    /static {
    alias /opt/myproj/static;
    }
    通过以上配置后在浏览器开发者模式的sources选项的域名目录下的static/js/app.js中会显示源码,我觉得问题应该是出在nginx中配置了/static所以就导致可访问static/js/app.js中内容,但我不知道其它方式通过webpack部署vue项目。

以上请大佬不吝赐教,感谢

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