angular-cli/addon/ng2/models/webpack-build-development.ts
Sean Larkin 22a6b59dd4 Revert change where sourcemaps were not ignored in dev. (#1728)
* Revert changes where sourcemaps were not ignored in dev, instead ignoring them across the board
2016-08-18 11:11:34 -05:00

30 lines
727 B
TypeScript

import { CliConfig } from './config';
const path = require('path')
export const getWebpackDevConfigPartial = function(projectRoot: string, sourceDir: string, outputDir: string) {
return {
devtool: 'source-map',
output: {
path: path.resolve(projectRoot, outputDir),
filename: '[name].bundle.js',
sourceMapFilename: '[name].map',
chunkFilename: '[id].chunk.js'
},
tslint: {
emitErrors: false,
failOnHint: false,
resourcePath: path.resolve(projectRoot, `./${sourceDir}`)
},
node: {
fs: 'empty',
global: 'window',
crypto: 'empty',
process: true,
module: false,
clearImmediate: false,
setImmediate: false
}
};
}