I am using Ionic Framework v5 with Vuejs (created with ionic start
).
It builds in production mode, but I want to build in development mode.
I build with ionic build
, and it outputs:
> vue-cli-service build
⠴ Building for production...
When I run vue-cli-service
directly - I get the same output.
When I run vue-cli-service build --mode development
- it builds in development mode.
I tried ionic build --mode development
, but it still builds in production mode.
I tried various additional configuration changes, but couldn't get ionic build
to build in development.
- How can this be done?
- When building in production mode - the code gets minified. How can I skip the minification?
UPDATE: I get the same results when I try to run it withionic build -lcs
:
user@ubuntu:~/project (master)$ ionic build -lcs
> vue-cli-service build
⠼ Building for production...Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
⠦ Building for production...
3条答案
按热度按时间gcxthw6b1#
你可以试试
或者,如果您正在尝试使用cordova,然后运行un device,请尝试以下命令注意:数据电缆必须始终连接到设备
在仿真器中运行:
ljsrvy3e2#
请仅在浏览器中使用以下代码
请按以下地址查阅:
https://ionicframework.com/docs/cli/commands/cordova-run
https://ionicframework.com/docs/developing/previewing
gwbalxhn3#
我使用的是Ionic 6而不是5,但是在this answer中运行下面的共享命令应该可以做到这一点。