mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 14:11:07 +00:00
better production source maps
This commit is contained in:
parent
8378a772e5
commit
adb43fbc10
@ -1,11 +1,11 @@
|
|||||||
import ExtractTextPlugin from "extract-text-webpack-plugin";
|
import ExtractTextPlugin from 'extract-text-webpack-plugin'
|
||||||
import { cloneDeep, defaults } from "lodash";
|
import { defaults, cloneDeep } from 'lodash'
|
||||||
import { join, resolve } from "path";
|
import { join, resolve } from 'path'
|
||||||
import webpack from "webpack";
|
import webpack from 'webpack'
|
||||||
import { isUrl, urlJoin } from "utils";
|
import { isUrl, urlJoin } from 'utils'
|
||||||
import autoprefixer from "autoprefixer";
|
import autoprefixer from 'autoprefixer'
|
||||||
import vueLoaderConfig from "./vue-loader.config";
|
import vueLoaderConfig from './vue-loader.config'
|
||||||
import { extractStyles, styleLoader } from "./helpers";
|
import { styleLoader, extractStyles } from './helpers'
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -28,7 +28,7 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
devtool: this.options.dev ? 'cheap-module-source-map' : false,
|
devtool: this.options.dev ? 'cheap-module-source-map' : 'nosources-source-map',
|
||||||
entry: {
|
entry: {
|
||||||
vendor: ['vue', 'vue-router', 'vue-meta']
|
vendor: ['vue', 'vue-router', 'vue-meta']
|
||||||
},
|
},
|
||||||
|
@ -23,7 +23,8 @@ export default function webpackServerConfig () {
|
|||||||
|
|
||||||
config = Object.assign(config, {
|
config = Object.assign(config, {
|
||||||
target: 'node',
|
target: 'node',
|
||||||
devtool: (this.options.dev ? 'source-map' : false),
|
node: false,
|
||||||
|
devtool: 'source-map',
|
||||||
entry: resolve(this.options.buildDir, 'server.js'),
|
entry: resolve(this.options.buildDir, 'server.js'),
|
||||||
output: Object.assign({}, config.output, {
|
output: Object.assign({}, config.output, {
|
||||||
filename: 'server-bundle.js',
|
filename: 'server-bundle.js',
|
||||||
|
Loading…
Reference in New Issue
Block a user