-
Notifications
You must be signed in to change notification settings - Fork 34
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
🐛 [Bug]: mock false 无效 并不能启用非mock 模式 #125
Comments
Title: 🐛 [Bug]: mock false is invalid and cannot enable non-mock mode |
@fengyon This is a issue of https://github.com/opentiny/tiny-cli |
感谢您的反馈,此问题的根因是
目前的临时修复措施是
我们将尽快优化模板 |
Thanks for your feedback, the root cause of this issue is
The current temporary fix is
We will optimize the template as soon as possible |
已解决,谢谢 |
Solved, thank you |
Title: 🐛 [Bug]: mock false is invalid and cannot enable non-mock mode |
Version
@opentiny/[email protected]
Vue Version
2.69
Link to minimal reproduction
config\vite.config.base.ts
`import { mergeConfig, loadEnv } from 'vite';
import eslint from 'vite-plugin-eslint';
import baseConfig from './vite.config.base';
const proxyConfig = {
[loadEnv('', process.cwd()).VITE_BASE_API]: {
target: loadEnv('', process.cwd()).VITE_SERVER_HOST,
changeOrigin: true,
logLevel: 'debug',
mock: false,
rewrite: (path) =>
path.replace(
new RegExp(
${loadEnv('', process.cwd()).VITE_BASE_API}
),''
),
},
};
export default mergeConfig(
{
mode: 'development',
server: {
open: true,
fs: {
strict: true,
},
proxy: {
...proxyConfig,
},
},
plugins: [
eslint({
include: ['src//*.ts', 'src//.tsx', 'src/**/.vue'],
exclude: ['node_modules'],
}),
],
},
baseConfig
);
.env
VITE_CONTEXT = /fire/
VITE_BASE_API = /api
VITE_SERVER_HOST = http://0.0.0.0:8080 //实际是服务器ip
VITE_USE_MOCK = false
`
修改配置后无效,并没有启用非mock模式
Step to reproduce
按上述修改,并没有启用非mock 模式,也许是我哪里没搞对
What is expected
No response
What is actually happening
No response
Any additional comments (optional)
No response
The text was updated successfully, but these errors were encountered: