Skip to content

Commit

Permalink
feat/ add nodejs native lib in webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegris committed May 12, 2017
1 parent 17b04e8 commit 27d9bc6
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,33 @@ function getPlugins() {
module.exports = {
"devtool": "source-map",
"externals": {
"child_process": 'require(\'child_process\')',
"electron": 'require(\'electron\')'
"electron": "require('electron')",
"child_process": "require('child_process')",
"crypto": "require('crypto')",
"events": "require('events')",
"fs": "require('fs')",
"http": "require('http')",
"https": "require('https')",
"assert": "require('assert')",
"dns": "require('dns')",
"net": "require('net')",
"os": "require('os')",
"path": "require('path')",
"querystring": "require('querystring')",
"readline": "require('readline')",
"repl": "require('repl')",
"stream": "require('stream')",
"string_decoder": "require('string_decoder')",
"url": "require('url')",
"util": "require('util')",
"zlib": "require('zlib')"
},
"resolve": {
"extensions": [
".ts",
".js",
".scss"
".scss",
".json"
],
"aliasFields": [],
"alias": { // WORKAROUND See. angular-cli/issues/5433
Expand Down Expand Up @@ -223,10 +242,6 @@ module.exports = {
/\/node_modules\//
]
},
{
"test": /\.json$/,
"loader": "json-loader"
},
{
"test": /\.html$/,
"loader": "html-loader"
Expand Down

0 comments on commit 27d9bc6

Please sign in to comment.