mirror of
https://github.com/1621740748/vue-ba.git
synced 2025-04-05 03:05:08 +08:00
42 lines
860 B
JavaScript
42 lines
860 B
JavaScript
var path = require('path')
|
|
var utils = require('./utils')
|
|
var config = require('../config')
|
|
var vueLoaderConfig = require('./vue-loader.conf')
|
|
|
|
function resolve (dir) {
|
|
return path.join(__dirname, '..', dir)
|
|
}
|
|
|
|
module.exports = {
|
|
entry: {
|
|
index: './src/index.js'
|
|
},
|
|
output: {
|
|
path: config.build.assetsRoot,
|
|
filename: '[name].js',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(js|vue)$/,
|
|
loader: 'eslint-loader',
|
|
enforce: 'pre',
|
|
include: [resolve('src'), resolve('test')],
|
|
options: {
|
|
formatter: require('eslint-friendly-formatter')
|
|
}
|
|
},
|
|
{
|
|
test: /\.vue$/,
|
|
loader: 'vue-loader',
|
|
options: vueLoaderConfig
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
loader: 'babel-loader',
|
|
include: [resolve('src'), resolve('test')]
|
|
}
|
|
]
|
|
}
|
|
}
|