filebrowser/assets/build/webpack.base.conf.js
Henrique Dias bd341f3ffc Clean build folder
Former-commit-id: e47639684bbb1b4d0a15ac8c39dbb0040ae86226 [formerly 3343000db072beb88cec31bb52b139313469f612] [formerly 062dd709613b5784dc8e9b2f327df3cd4c95dc75 [formerly 69d8cd6343]]
Former-commit-id: 1c0ebd340266b2020ffba94d2370dbf7c98d1aa6 [formerly fcf840509a0f782b8460fb354aed513dbaa10aa2]
Former-commit-id: bd4e275034627c7ff9c8b60c1405ce6aed912761
2017-07-06 09:04:10 +01:00

66 lines
1.4 KiB
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: {
app: './assets/src/main.js'
},
output: {
path: config.assetsRoot,
filename: '[name].js',
publicPath: config.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src')
}
},
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')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
// limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
}
}