mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
* Revert changes where sourcemaps were not ignored in dev, instead ignoring them across the board
30 lines
727 B
TypeScript
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
|
|
}
|
|
};
|
|
}
|