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

前端如何部署? #18

Open
gallexy opened this issue Dec 21, 2023 · 1 comment
Open

前端如何部署? #18

gallexy opened this issue Dec 21, 2023 · 1 comment

Comments

@gallexy
Copy link

gallexy commented Dec 21, 2023

怎么找不到前端部署文件?

@gallexy
Copy link
Author

gallexy commented Dec 25, 2023

弄了几天终于调通了, vue.config.js好像有点问题, outputDir 设为当前目录会报错:
const FileManagerPlugin = require('filemanager-webpack-plugin')
const Moment = require('moment')

module.exports = {
publicPath: './',
productionSourceMap: false, // 不产出 .map 文件

outputDir: './',
devServer: {

ubuntu@instance-arm1:~/dev/diary$ npm run build

[email protected] build
vue-cli-service build --mode production

✔ Building legacy bundle for production...
ERROR Error:

    Configuration Error: Do not set output directory to project root.

Error:

Configuration Error: Do not set output directory to project root.

改成./dist 就没问题了。

image

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