Laravel + Vue:捆绑包太大,但无法说出原因

时间:2019-04-07 06:44:46

标签: laravel vue.js laravel-mix

我在laravel应用的一小部分中使用Vue。我没有将它用于图像,所以它只是Vue组件内部的js和css。它是256kb,即使缩小后也是如此,也是256kb。我刚刚在下面发布了我的package.json文件。是否有任何看起来像重复的包装?或任何其他减小捆绑包大小的方法?

  "private": true,
  "scripts": {
    "dev": "cross-env NODE_ENV=development  webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "cross-env NODE_ENV=development  webpack --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "cross-env NODE_ENV=development  webpack-dev-server --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "cross-env NODE_ENV=production  webpack --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "devDependencies": {
    "bootstrap-sass": "^3.3.7",
    "gulp": "^3.9.1",
    "jquery": "^3.1.0",
    "laravel-elixir": "^6.0.0-9",
    "laravel-elixir-vue-2": "^0.2.0",
    "laravel-elixir-webpack-official": "^1.0.2",
    "laravel-mix": "^4.0.14",
    "lodash": "^4.16.2",
    "resolve-url-loader": "^2.3.1",
    "sass": "^1.17.2",
    "sass-loader": "^7.1.0",
    "vue": "^2.0.1",
    "vue-loader": "^15.7.0",
    "vue-resource": "^1.0.3",
    "vue-template-compiler": "^2.6.8"
  },
  "dependencies": {
    "axios": "^0.18.0",
    "cross-env": "^5.2.0"
  }
}```

0 个答案:

没有答案