Skip to content
Permalink
Browse files

chore(build): Only uglify for min.js

  • Loading branch information...
davidchin committed Mar 28, 2017
1 parent 9a3d2c3 commit c73a491774b0f2bc8db902b02188975d8d488e59
Showing with 24 additions and 15 deletions.
  1. +3 −1 package.json
  2. +5 −1 webpack.config.babel.js
  3. +16 −13 yarn.lock
@@ -66,6 +66,8 @@
"sass-loader": "^6.0.3",
"sasslint-webpack-plugin": "^1.0.4",
"style-loader": "^0.14.0",
"uglify-js": "^2.8.16",
"uglifyjs-webpack-plugin": "^0.3.1",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.4.2"
},
@@ -76,7 +78,7 @@
"scripts": {
"prebuild": "npm test && rm -rf lib",
"build": "npm run build:lib && npm run build:scss && npm run build:bundle",
"build:bundle": "NODE_ENV=production webpack -p",
"build:bundle": "NODE_ENV=production webpack",
"build:lib": "NODE_ENV=production babel src/js --out-dir lib/js --source-maps",
"build:scss": "NODE_ENV=production node-sass src/scss --recursive --source-map true --output lib/css",
"changelog": "conventional-changelog --preset angular --infile CHANGELOG.md --same-file",
@@ -1,4 +1,5 @@
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import UglifyJsPlugin from 'uglifyjs-webpack-plugin';
import path from 'path';

const webpackConfig = {
@@ -26,7 +27,6 @@ const webpackConfig = {
{
include: path.resolve(__dirname, 'src'),
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'postcss-loader', 'sass-loader'],
}),
test: /\.scss$/,
@@ -35,6 +35,10 @@ const webpackConfig = {
},
plugins: [
new ExtractTextPlugin('[name]'),
new UglifyJsPlugin({
sourceMap: true,
test: /\.min\.js$/,
}),
],
resolve: {
modules: ['node_modules'],
@@ -246,10 +246,6 @@ async@^2.1.2, async@^2.1.5:
dependencies:
lodash "^4.14.0"

async@~0.2.6:
version "0.2.10"
resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"

async@~0.9.0:
version "0.9.2"
resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"
@@ -5945,18 +5941,18 @@ ua-parser-js@^0.7.9:
version "0.7.12"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb"

uglify-js@^2.6:
version "2.7.5"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8"
uglify-js@^2.6, uglify-js@^2.8.5:
version "2.8.15"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.15.tgz#835dd4cd5872554756e6874508d0d0561704d94d"
dependencies:
async "~0.2.6"
source-map "~0.5.1"
uglify-to-browserify "~1.0.0"
yargs "~3.10.0"
optionalDependencies:
uglify-to-browserify "~1.0.0"

uglify-js@^2.8.5:
version "2.8.15"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.15.tgz#835dd4cd5872554756e6874508d0d0561704d94d"
uglify-js@^2.8.16:
version "2.8.16"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.16.tgz#d286190b6eefc6fd65eb0ecac6551e0b0e8839a4"
dependencies:
source-map "~0.5.1"
yargs "~3.10.0"
@@ -5967,6 +5963,13 @@ uglify-to-browserify@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"

uglifyjs-webpack-plugin@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.3.1.tgz#dbee23420c0d84534736a3723c63022a091410dd"
dependencies:
source-map "^0.5.6"
webpack-sources "^0.1.4"

uid-number@~0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
@@ -6139,7 +6142,7 @@ webpack-dev-server@^2.4.2:
webpack-dev-middleware "^1.9.0"
yargs "^6.0.0"

webpack-sources@^0.1.0:
webpack-sources@^0.1.0, webpack-sources@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.1.5.tgz#aa1f3abf0f0d74db7111c40e500b84f966640750"
dependencies:

0 comments on commit c73a491

Please sign in to comment.
You can’t perform that action at this time.