Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Commit

Permalink
fix(webpack): Fix sourcemapping issues
Browse files Browse the repository at this point in the history
see #18
  • Loading branch information
hypery2k committed Nov 18, 2016
1 parent 191c356 commit 4eb1d8d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.travis.yml
Jenkinsfile
.idea/
.awcache/
dist/
Expand Down
4 changes: 2 additions & 2 deletions etc/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = function (config) {
* available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
*/
preprocessors: {
[bundle]: ['webpack']
[bundle]: ['webpack', 'sourcemap']
},

webpack: webpackConfig,
Expand All @@ -66,7 +66,7 @@ module.exports = function (config) {

webpackMiddleware: {
stats: {
chunks:false,
chunks: false,
colors: true
}
},
Expand Down
2 changes: 1 addition & 1 deletion etc/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = webpackMerge(commonConfig, {
* See: http://webpack.github.io/docs/configuration.html#devtool
* See: https://github.com/webpack/docs/wiki/build-performance#sourcemaps
*/
devtool: '#eval',
devtool: '#source-map',

/**
* Options affecting the output of the compilation.
Expand Down
4 changes: 4 additions & 0 deletions etc/webpack.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ module.exports = webpackMerge(commonConfig, {
* See: http://webpack.github.io/docs/configuration.html#plugins
*/
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: null, // if no value is provided the sourcemap is inlined
test: /\.(ts|js)($|\?)/i // process .js and .ts files only
}),
new webpack.LoaderOptionsPlugin({
test: /\.ts/i,
options: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Common angular build module for Angular 2",
"scripts": {
"webpack": "webpack",
"watch": "cross-env NODE_ENV=development webpack-dev-server --inline --colors --progress --display-error-details --display-cached --port 3000 ",
"watch": "cross-env NODE_ENV=development webpack-dev-server --inline --progress --port 3000 ",
"build": "npm run tslint && npm run tsc && cross-env NODE_ENV=production webpack",
"lite": "lite-server",
"test": "cross-env NODE_ENV=test jasmine-node test/*.spec.js --junitreport --output target/test-reports/ --verbose --noStack --color",
Expand Down

0 comments on commit 4eb1d8d

Please sign in to comment.