python查看库文件位置_如何查看webpack引入依赖库的位置(哪个文件)

我在*.vue,main.js中都没有引入jquery。但是用 webpack-bundle-size-analyzer 分析bundle文件的时候,显示jquery已经引入了依赖:$ webpack --json | webpack-bundle-size-analyzer

vue: 274.93 KB (26.7%)

jquery: 261.76 KB (25.4%)

webuploader: 254.54 KB (24.7%)

buffer: 47.47 KB (4.61%)

axios: 36.19 KB (3.52%)

cuint: 24.69 KB (2.40%)

xxhashjs: 20.97 KB (2.04%)

vue-style-loader: 6.54 KB (0.635%)

setimmediate: 6.32 KB (0.614%)

process: 5.29 KB (0.514%)

base64-js: 3.39 KB (0.329%)

vue-loader: 2.83 KB (0.275%)

css-loader: 2.21 KB (0.214%)

ieee754: 2.01 KB (0.195%)

timers-browserify: 1.33 KB (0.129%)

is-buffer: 698 B (0.0662%)

webpack: 488 B (0.0463%)

isarray: 132 B (0.0125%)

: 77.6 KB (7.54%)

main.js://import 'babel-polyfill';

import Vue from 'vue'

import ImageUpload from './ImageUpload.vue'

import AttachUpload from './AttachUpload.vue'

import Draggable from './directives/draggable'

Vue.component('imageupload',ImageUpload);

Vue.component('attachupload',AttachUpload);

Vue.directive('draggable',Draggable);

//var jQuery = window.jQuery;

new Vue({

el: '#app',

//render: h => h(App)

});

webpack.config.js:var path = require('path')

var webpack = require('webpack')

module.exports = {

entry: './src/main.js',

output: {

path: path.resolve(__dirname, './dist'),

publicPath: '/dist/',

filename: 'build.js'

},

module: {

rules: [

{

test: /\.vue$/,

loader: 'vue-loader',

options: {

loaders: {

}

// other vue-loader options go here

}

},

{

test: /\.js$/,

loader: 'babel-loader',

exclude: /node_modules/

},

{

test: /\.(png|jpg|gif|svg)$/,

loader: 'file-loader',

options: {

name: '[name].[ext]?[hash]'

}

}

]

},

resolve: {

alias: {

'vue$': 'vue/dist/vue.esm.js'

}

},

devServer: {

historyApiFallback: true,

noInfo: true

},

performance: {

hints: false

},

devtool: '#eval-source-map'

}

if (process.env.NODE_ENV === 'production') {

module.exports.devtool = '#source-map'

// http://vue-loader.vuejs.org/en/workflow/production.html

module.exports.plugins = (module.exports.plugins || []).concat([

new webpack.DefinePlugin({

'process.env': {

NODE_ENV: '"production"'

}

}),

new webpack.optimize.UglifyJsPlugin({

sourceMap: true,

compress: {

warnings: false

}

}),

new webpack.LoaderOptionsPlugin({

minimize: true

})

])

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值