Skip to content

Commit

Permalink
Add production source maps (#776)
Browse files Browse the repository at this point in the history
* WIP adding source map configuration

* Darn it, sometimes CircleCI container does NOT have yarn!
  • Loading branch information
jordanh authored and mattkrick committed Mar 5, 2017
1 parent be36ffb commit 4798913
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"jest-junit-reporter": "^1.0.1",
"json-loader": "0.5.4",
"lockfile": "^1.0.2",
"manifest-assets-webpack-plugin": "^4.0.0",
"mockdate": "^2.0.1",
"piping": "^1.0.0-rc.4",
"pre-commit": "^1.1.3",
Expand All @@ -100,6 +99,7 @@
"@segment/snippet": "^4.0.1",
"analytics-node": "^2.1.1",
"aphrodite-local-styles": "0.6.2",
"assets-webpack-plugin": "^3.5.1",
"auth0": "^2.5.0",
"auth0-lock": "^9.2.2",
"aws-sdk": "^2.7.19",
Expand Down
9 changes: 7 additions & 2 deletions webpack/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path';
import webpack from 'webpack';
import AssetsPlugin from 'manifest-assets-webpack-plugin';
import AssetsPlugin from 'assets-webpack-plugin';
import WebpackShellPlugin from 'webpack-shell-plugin';
import S3Plugin from 'webpack-s3-plugin';
import {getDotenv} from '../src/universal/utils/dotenv';
Expand Down Expand Up @@ -32,7 +32,11 @@ const prefetchPlugins = prefetches.map(specifier => new webpack.PrefetchPlugin(s

const deployPlugins = [];
if (process.env.WEBPACK_MIN) {
deployPlugins.push(new webpack.optimize.UglifyJsPlugin({compressor: {warnings: false}, comments: /(?:)/}));
deployPlugins.push(new webpack.optimize.UglifyJsPlugin({
compressor: {warnings: false},
comments: /(?:)/,
sourceMap: true
}));
deployPlugins.push(new webpack.LoaderOptionsPlugin({comments: false}));
}
if (process.env.WEBPACK_DEPLOY) {
Expand Down Expand Up @@ -97,6 +101,7 @@ export default {
]
})
],
devtool: 'source-map',
module: {
loaders: [
{test: /\.json$/, loader: 'json-loader'},
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,16 @@ assertion-error@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"

assets-webpack-plugin@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/assets-webpack-plugin/-/assets-webpack-plugin-3.5.1.tgz#931ce0d66d42e88ed5e7f18d65522943c57a387d"
dependencies:
camelcase "^1.2.1"
escape-string-regexp "^1.0.3"
lodash.assign "^3.2.0"
lodash.merge "^3.3.2"
mkdirp "^0.5.1"

ast-traverse@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/ast-traverse/-/ast-traverse-0.1.1.tgz#69cf2b8386f19dcda1bb1e05d68fe359d8897de6"
Expand Down Expand Up @@ -4313,14 +4323,10 @@ lodash@4.12.0:
version "4.12.0"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.12.0.tgz#2bd6dc46a040f59e686c972ed21d93dc59053258"

lodash@^3.10.1:
lodash@^3.10.1, lodash@^3.5.0:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"

lodash@^3.5.0, lodash@~3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.5.0.tgz#19bb3f4d51278f0b8c818ed145c74ecf9fe40e6d"

lodash@^4.0.0, lodash@^4.12.0, lodash@^4.13.0, lodash@^4.14.0, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1, lodash@^4.8.0, lodash@~4.17.2:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
Expand All @@ -4329,6 +4335,10 @@ lodash@~2.4.1:
version "2.4.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-2.4.2.tgz#fadd834b9683073da179b3eae6d9c0d15053f73e"

lodash@~3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.5.0.tgz#19bb3f4d51278f0b8c818ed145c74ecf9fe40e6d"

longest@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
Expand Down Expand Up @@ -4398,16 +4408,6 @@ makeerror@1.0.x:
dependencies:
tmpl "1.0.x"

manifest-assets-webpack-plugin@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/manifest-assets-webpack-plugin/-/manifest-assets-webpack-plugin-4.0.0.tgz#79bd8ee7379c60d241556ffc4d2be73480247b93"
dependencies:
camelcase "^1.2.1"
escape-string-regexp "^1.0.3"
lodash.assign "^3.2.0"
lodash.merge "^3.3.2"
mkdirp "^0.5.1"

map-obj@^1.0.0, map-obj@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
Expand Down

0 comments on commit 4798913

Please sign in to comment.