This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 2 files changed +9
-17
lines changed
2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = function ( config ) {
2
2
var path = require ( 'path' )
3
- var node_modules_dir = path . join ( __dirname , 'node_modules' )
4
- var deps = [
5
- 'peer-id/deps/forge.bundle.js'
6
- ]
7
-
3
+ var nodeForgePath = path . resolve ( __dirname , 'node_modules/peer-id/deps/forge.bundle.js' )
4
+
8
5
config . set ( {
9
6
basePath : '' ,
10
7
frameworks : [ 'mocha' ] ,
11
8
12
9
files : [
10
+ nodeForgePath ,
13
11
'tests/test-core/browser.js'
14
12
] ,
15
13
@@ -19,21 +17,20 @@ module.exports = function (config) {
19
17
20
18
webpack : {
21
19
resolve : {
22
- extensions : [ '' , '.js' , '.json' ] ,
23
- alias : { 'node-forge' : node_modules_dir + '/peer-id/deps/forge.bundle.js' }
20
+ extensions : [ '' , '.js' , '.json' ]
24
21
} ,
25
22
externals : {
26
- fs : '{}'
23
+ fs : '{}' ,
24
+ 'node-forge' : 'forge'
27
25
} ,
28
26
node : {
29
27
Buffer : true
30
28
} ,
31
29
module : {
32
30
loaders : [
33
31
{ test : / \. j s o n $ / , loader : 'json' }
34
- ] ,
35
- noParse : [ ]
36
- } ,
32
+ ]
33
+ }
37
34
} ,
38
35
39
36
webpackMiddleware : {
@@ -50,9 +47,4 @@ module.exports = function (config) {
50
47
browsers : process . env . TRAVIS ? [ 'Firefox' ] : [ 'Chrome' ] ,
51
48
singleRun : true
52
49
} )
53
-
54
- deps . forEach ( function ( dep ) {
55
- var depPath = path . resolve ( node_modules_dir , dep )
56
- config . webpack . module . noParse . push ( depPath )
57
- } )
58
50
}
Original file line number Diff line number Diff line change 59
59
"rimraf" : " ^2.4.4" ,
60
60
"standard" : " ^5.4.1" ,
61
61
"transform-loader" : " ^0.2.3" ,
62
- "webpack" : " ^2.0.5 -beta"
62
+ "webpack" : " ^2.0.7 -beta"
63
63
},
64
64
"dependencies" : {
65
65
"bl" : " ^1.0.0" ,
You can’t perform that action at this time.
0 commit comments