Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
We bundle our app with ionic build browser --prod and serve it with an jetty webserver. After that we open the app from different devices with the browser and think there could be a problem on recognize the right platform.
Browser from destkop: [cordova, core]
Browser from smartphone: [cordova,mobile,android]
Browser from tablet: [cordova, core]
Browser from smartphone emulator: [cordova,mobile,android]
Expected behavior:
I'm not sure which should be the right behavior
core: means from DESKTOP and not from BROWSER
So I think anything is right expect the platforms for tablet, they should be [cordova,mobile,android,tablet] which would be exactly the same platforms open the hybrid app from tablet.
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
Cordova CLI: 6.5.0
Ionic Framework Version: 2.1.0-201702281739
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.8
Node Version: v6.10.0
Xcode version: Not installed
The cordova-browser platform is not really meant to be a deploy target at the moment.
It's still very much a "testing target" for quickly working with plugins, and does not have the full functionality that needed. This would explain why the platform detection is quite off in certain situations.
@mhartington okay, but please can you explain us which is the right way to deploy our webapp to a webserver, with and without progressive webapp support? Now tat you include the amazing split pane and also the new grid like bootstrap we wan't also deploy the app to a webserver like jetty?
I can not find documentation about it.
It's something we're working improving.
Right now the best way would be to run npm run build --prod and just deploy the www folder
Thx I'll have a look to it on Monday when I'm back to work.
Split pane and new grid are amazing and the first big step to more trasversal desktop support, great work, I can't wait for new feature :)
@mhartington I tested build my webapp for browser doing npm run build --prod but I run into an error.
[09:11:35] uglifyjs started ...
[09:11:35] sass: src/pages/data-recording/data-recording.scss, line: 2
File to import not found or unreadable: ngx-datatable/release/index. Parent style sheet:
/home/michi/software/workspace/web-client-ionic/src/pages/data-recording/data-recording.scss
L1: data-recording {
L2: @import "ngx-datatable/release/index";
L3: @import "ngx-datatable/release/themes/material";
[09:11:35] sass failed
[09:11:35] ionic-app-script task: "build"
[09:11:35] Error: Error
I to two imports in data-recording.scss files importing index.css and material.css from node_modules folder configuring the path in local sass.config.js file
includePaths: [
'node_modules/@swimlane'
],
This is working fine for ionic serve, ionic emulate android --prod, ionic run android --prod and ionic build browser --prod
Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum or on our slack channel. Thanks for using Ionic!
Okay thx, but's not a question, that's still a bug.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
It's something we're working improving.
Right now the best way would be to run
npm run build --prodand just deploy the www folder