var path = require('path') module.exports = { entry: path.resolve('proj/index.js'), output: { path: path.resolve('static/src'), filename: 'main.js' }, resolve: { extensions: ['.js', '.vue', '.json'], alias: { 'vue$': 'vue/dist/vue.esm.js', '@': path.resolve('proj') } }, module: { rules: [ { test: /\.vue$/, loader: 'vue-loader' }, { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' }, { test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, loader: 'url-loader', options: { limit: 10000, name: path.posix.join('static', 'img/[name].[hash:7].[ext]') } } ] } }