In a project generated by vue-cli, how to build two sets of pages on both the mobile side and the PC side at the same time? where can you tell whether it is a PC or a mobile device?

can you provide some ideas, or an example project?
Thank you.

Apr.21,2021

refer to this
https://codeshelper.com/a/11.


npm run build:mobile

npm run build:pc
package.json

{
  "scripts": {
     "build:mobile": "webpack --config webpack.m.config.js",
     "build:pc": "webpack --config webpack.pc.config.js"
  }

}

then you extract the common configuration yourself and merge it through webpack-merge.

the configuration entries of mobile and pc are different, and what else is different needs to be decided according to your project.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3da4d-2bb28.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3da4d-2bb28.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?