-
Notifications
You must be signed in to change notification settings - Fork 191
Update dependencies #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
17f978e
9837ba5
b851de8
2540ce9
d3a6aee
5b8a253
f57e2d7
27341a5
890b415
30a70fb
bebdb27
751c4b7
fa4732b
838e8b4
946d4eb
90f42b2
9f84e57
ae1c8ec
c9dfefb
56bd631
f41c337
cafcf84
21f1fc8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
{ | ||
"presets": [ | ||
"latest" | ||
] | ||
], | ||
"env": { | ||
"production": { | ||
"presets": [ | ||
["latest", { | ||
"es2015": { | ||
"modules": false | ||
} | ||
}] | ||
] | ||
} | ||
} | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,42 +25,42 @@ | |
"author": "Cory House", | ||
"license": "MIT", | ||
"dependencies": { | ||
"whatwg-fetch": "1.0.0" | ||
"whatwg-fetch": "2.0.2" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "6.16.0", | ||
"babel-core": "6.17.0", | ||
"babel-loader": "6.2.5", | ||
"babel-preset-latest": "6.16.0", | ||
"babel-register": "6.16.3", | ||
"babel-cli": "6.23.0", | ||
"babel-core": "6.23.1", | ||
"babel-loader": "6.3.2", | ||
"babel-preset-latest": "6.22.0", | ||
"babel-register": "6.23.0", | ||
"chai": "3.5.0", | ||
"chalk": "1.1.3", | ||
"cheerio": "0.22.0", | ||
"compression": "1.6.2", | ||
"cross-env": "3.1.3", | ||
"css-loader": "0.25.0", | ||
"eslint": "3.8.1", | ||
"eslint-plugin-import": "2.0.1", | ||
"eslint-watch": "2.1.14", | ||
"express": "4.14.0", | ||
"extract-text-webpack-plugin": "1.0.1", | ||
"html-webpack-plugin": "2.22.0", | ||
"jsdom": "9.8.0", | ||
"json-schema-faker": "0.3.6", | ||
"json-server": "0.8.22", | ||
"localtunnel": "1.8.1", | ||
"mocha": "3.1.2", | ||
"nock": "8.1.0", | ||
"npm-run-all": "3.1.1", | ||
"cross-env": "3.1.4", | ||
"css-loader": "0.26.1", | ||
"eslint": "3.15.0", | ||
"eslint-plugin-import": "2.2.0", | ||
"eslint-watch": "3.0.0", | ||
"express": "4.14.1", | ||
"extract-text-webpack-plugin": "2.0.0-beta.4", | ||
"html-webpack-plugin": "2.28.0", | ||
"jsdom": "9.11.0", | ||
"json-schema-faker": "0.4.0", | ||
"json-server": "0.9.5", | ||
"localtunnel": "1.8.2", | ||
"mocha": "3.2.0", | ||
"nock": "9.0.6", | ||
"npm-run-all": "4.0.1", | ||
"nsp": "2.6.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Node security project (NSP) is now built into npm, so you don't need to reference it or call it manually anymore. 😀 |
||
"numeral": "1.5.3", | ||
"numeral": "2.0.4", | ||
"open": "0.0.5", | ||
"rimraf": "2.5.4", | ||
"rimraf": "2.6.0", | ||
"style-loader": "0.13.1", | ||
"surge": "0.18.0", | ||
"webpack": "1.13.2", | ||
"webpack-dev-middleware": "1.8.4", | ||
"webpack-hot-middleware": "2.13.0", | ||
"webpack": "2.2.1", | ||
"webpack-dev-middleware": "1.10.1", | ||
"webpack-hot-middleware": "2.17.0", | ||
"webpack-md5-hash": "0.0.5" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import webpack from 'webpack'; | ||
import path from 'path'; | ||
import HtmlWebpackPlugin from 'html-webpack-plugin'; | ||
|
||
export default { | ||
debug: true, | ||
resolve: { | ||
extensions: ['*', '.js', '.jsx', '.json'] | ||
}, | ||
devtool: 'inline-source-map', | ||
noInfo: false, | ||
entry: [ | ||
path.resolve(__dirname, 'src/index') | ||
], | ||
|
@@ -15,6 +17,11 @@ export default { | |
filename: 'bundle.js' | ||
}, | ||
plugins: [ | ||
new webpack.LoaderOptionsPlugin({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that debug and noInfo are now handled here instead in Webpack 2+. |
||
minimize: false, | ||
debug: true, | ||
noInfo: true // set to false to see a list of every file being bundled. | ||
}), | ||
// Create HTML file that includes reference to bundled JS. | ||
new HtmlWebpackPlugin({ | ||
template: 'src/index.html', | ||
|
@@ -23,8 +30,8 @@ export default { | |
], | ||
module: { | ||
loaders: [ | ||
{test: /\.js$/, exclude: /node_modules/, loaders: ['babel']}, | ||
{test: /\.css$/, loaders: ['style','css']} | ||
{test: /\.js$/, exclude: /node_modules/, loaders: ['babel-loader']}, | ||
{test: /\.css$/, loaders: ['style-loader','css-loader']} | ||
] | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2015 modules can be parsed by webpack 2. This enables tree shaking in the production build by disabling Babel's transpilation of ES2015 modules. Since ES2015 modules are statically analyzable, webpack can determine with certainly what code you're not calling, and leave it out of the bundle. This process can reduce your final bundle size. It's commonly called tree shaking or dead code elimination.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also switched to babel-preset-env since it replaced babel-preset-latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to update all "latest" with "env" in .babelrc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcscott2015 - Correct, and I did that as you can see above.