Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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: {
- diffTable: './js/diff/app.js',
- reportsEdit: './js/reports/reports-edit.js',
- dashboard: './js/dashboard/app.js',
- common: './js/common.js',
- users: './js/users/index.js',
- register: './js/register.js',
- departments: './js/departments/index.js',
- departments_show: './js/departments/show.js',
- locations: './js/locations/index.js',
- locations_show: './js/locations/show.js',
- organizations: './js/organizations/index.js',
- organizations_show: './js/organizations/show.js',
- },
- output: {
- path: config.build.assetsRoot,
- filename: '[name].js',
- publicPath: process.env.NODE_ENV === 'production'
- ? config.build.assetsPublicPath
- : config.dev.assetsPublicPath
- },
- resolve: {
- extensions: ['.js', '.vue', '.json'],
- alias: {
- 'vue$': 'vue/dist/vue.js',
- '@': resolve('src'),
- }
- },
- module: {
- rules: [
- {
- test: /\.vue$/,
- loader: 'vue-loader',
- options: vueLoaderConfig
- },
- {
- test: /\.js$/,
- loader: 'babel-loader',
- exclude: /(node_modules|bower_components)/,
- options: {
- presets: ['es2015']
- }
- },
- {
- test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
- loader: 'url-loader',
- options: {
- limit: 10000,
- name: utils.assetsPath('img/[name].[ext]')
- }
- },
- {
- test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
- loader: 'url-loader',
- options: {
- limit: 10000,
- name: utils.assetsPath('media/[name].[ext]')
- }
- },
- {
- test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
- loader: 'url-loader',
- options: {
- limit: 10000,
- name: utils.assetsPath('fonts/[name].[ext]')
- }
- }
- ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement