Update webpack configs

This commit is contained in:
Roman Hotsiy 2016-08-29 07:35:47 +03:00
parent 803410da40
commit 1f4f688bc4
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0
4 changed files with 14 additions and 11 deletions

View File

@ -7,7 +7,6 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = { module.exports = {
context: root(), context: root(),
debug: false,
devtool: 'cheap-module-source-map', devtool: 'cheap-module-source-map',
resolve: { resolve: {
@ -43,10 +42,10 @@ module.exports = {
}, },
module: { module: {
// preLoaders: [{ preLoaders: [{
// test: /\.js$/, test: /\.js$/,
// loader: 'source-map' loader: 'source-map'
// // }, }],
loaders: [{ loaders: [{
test: /\.ts$/, test: /\.ts$/,
loader: 'awesome-typescript-loader', loader: 'awesome-typescript-loader',
@ -71,7 +70,7 @@ module.exports = {
output: { output: {
comments: false comments: false
}, },
sourceMap: false sourceMap: true
}), }),
new webpack.DefinePlugin({ new webpack.DefinePlugin({

View File

@ -8,7 +8,6 @@ const VERSION = JSON.stringify(require('../package.json').version);
module.exports = { module.exports = {
//context: root(), //context: root(),
devtool: 'inline-source-map', devtool: 'inline-source-map',
debug: true,
resolve: { resolve: {
extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'], extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'],
root: root('lib'), root: root('lib'),
@ -38,6 +37,10 @@ module.exports = {
}, },
module: { module: {
preLoaders: [{
test: /\.js$/,
loader: 'source-map'
}],
loaders: [ { loaders: [ {
test: /\.ts$/, test: /\.ts$/,
loaders: [ loaders: [

View File

@ -15,7 +15,7 @@
"e2e": "npm run build:prod && npm run e2e-copy && npm run webdriver && protractor", "e2e": "npm run build:prod && npm run e2e-copy && npm run webdriver && protractor",
"deploy": "node ./build/prepare_deploy.js && deploy-to-gh-pages --update demo", "deploy": "node ./build/prepare_deploy.js && deploy-to-gh-pages --update demo",
"ngc": "ngc -p .", "ngc": "ngc -p .",
"webpack:prod": "webpack --config build/webpack.prod.js --progress --profile --bail", "webpack:prod": "webpack --config build/webpack.prod.js --profile --bail",
"build:sass": "node-sass -o lib lib", "build:sass": "node-sass -o lib lib",
"build:prod": "npm run build:sass && npm run ngc && npm run webpack:prod", "build:prod": "npm run build:sass && npm run ngc && npm run webpack:prod",
"build-dist": "npm run build:prod", "build-dist": "npm run build:prod",
@ -74,6 +74,7 @@
"shelljs": "^0.7.0", "shelljs": "^0.7.0",
"should": "^9.0.2", "should": "^9.0.2",
"sinon": "^1.17.2", "sinon": "^1.17.2",
"source-map-loader": "^0.1.5",
"style-loader": "^0.13.1", "style-loader": "^0.13.1",
"ts-helpers": "^1.1.1", "ts-helpers": "^1.1.1",
"tslint": "^3.15.0-dev.0", "tslint": "^3.15.0-dev.0",