better production source maps

This commit is contained in:
Pooya Parsa 2017-06-20 00:44:13 +04:30
parent 8378a772e5
commit adb43fbc10
2 changed files with 11 additions and 10 deletions

View File

@ -1,11 +1,11 @@
import ExtractTextPlugin from "extract-text-webpack-plugin";
import { cloneDeep, defaults } from "lodash";
import { join, resolve } from "path";
import webpack from "webpack";
import { isUrl, urlJoin } from "utils";
import autoprefixer from "autoprefixer";
import vueLoaderConfig from "./vue-loader.config";
import { extractStyles, styleLoader } from "./helpers";
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import { defaults, cloneDeep } from 'lodash'
import { join, resolve } from 'path'
import webpack from 'webpack'
import { isUrl, urlJoin } from 'utils'
import autoprefixer from 'autoprefixer'
import vueLoaderConfig from './vue-loader.config'
import { styleLoader, extractStyles } from './helpers'
/*
|--------------------------------------------------------------------------
@ -28,7 +28,7 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
}
const config = {
devtool: this.options.dev ? 'cheap-module-source-map' : false,
devtool: this.options.dev ? 'cheap-module-source-map' : 'nosources-source-map',
entry: {
vendor: ['vue', 'vue-router', 'vue-meta']
},

View File

@ -23,7 +23,8 @@ export default function webpackServerConfig () {
config = Object.assign(config, {
target: 'node',
devtool: (this.options.dev ? 'source-map' : false),
node: false,
devtool: 'source-map',
entry: resolve(this.options.buildDir, 'server.js'),
output: Object.assign({}, config.output, {
filename: 'server-bundle.js',