0元购项目,Web调用原生的demo

index.js 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. 'use strict'
  2. // Template version: 1.3.1
  3. // see http://vuejs-templates.github.io/webpack for documentation.
  4. const path = require('path')
  5. let p = path.resolve(__dirname, '')
  6. console.log('启动服务地址可在node环境中配置'+p)
  7. module.exports = {
  8. dev: {
  9. // Paths
  10. assetsSubDirectory: 'static',
  11. assetsPublicPath: '/',
  12. proxyTable: {},
  13. // Various Dev Server settings
  14. host: '192.168.31.101', // can be overwritten by process.env.HOST
  15. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  16. autoOpenBrowser: false,
  17. errorOverlay: true,
  18. notifyOnErrors: true,
  19. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  20. // Use Eslint Loader?
  21. // If true, your code will be linted during bundling and
  22. // linting errors and warnings will be shown in the console.
  23. useEslint: true,
  24. // If true, eslint errors and warnings will also be shown in the error overlay
  25. // in the browser.
  26. showEslintErrorsInOverlay: false,
  27. /**
  28. * Source Maps
  29. */
  30. // https://webpack.js.org/configuration/devtool/#development
  31. devtool: 'cheap-module-eval-source-map',
  32. // If you have problems debugging vue-files in devtools,
  33. // set this to false - it *may* help
  34. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  35. cacheBusting: true,
  36. cssSourceMap: true
  37. },
  38. build: {
  39. // Template for index.html
  40. index: path.resolve(__dirname, '../dist/index.html'),
  41. // Paths
  42. assetsRoot: path.resolve(__dirname, '../dist'),
  43. assetsSubDirectory: 'static',
  44. assetsPublicPath: '/',
  45. /**
  46. * Source Maps
  47. */
  48. productionSourceMap: true,
  49. // https://webpack.js.org/configuration/devtool/#production
  50. devtool: '#source-map',
  51. // Gzip off by default as many popular static hosts such as
  52. // Surge or Netlify already gzip all static assets for you.
  53. // Before setting to `true`, make sure to:
  54. // npm install --save-dev compression-webpack-plugin
  55. productionGzip: false,
  56. productionGzipExtensions: ['js', 'css'],
  57. // Run the build command with an extra argument to
  58. // View the bundle analyzer report after build finishes:
  59. // `npm run build --report`
  60. // Set to `true` or `false` to always turn it on or off
  61. bundleAnalyzerReport: process.env.npm_config_report
  62. }
  63. }