Skip to content

Commit 3d5e456

Browse files
committed
Change module loader to commonjs
1 parent 3195f9d commit 3d5e456

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

tests/karma-test-shim.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ System.config({
7575
'rxjs': {
7676
defaultExtension: 'js'
7777
}
78-
},
79-
meta: {
80-
'src/*': {
81-
format: 'register'
82-
}
8378
}
8479
});
8580

tests/karma.conf.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,17 @@ module.exports = function(config){
1313
'http://cdn-na.infragistics.com/igniteui/latest/js/infragistics.dv.js',
1414
'https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js',
1515

16-
// System.js for module loading
16+
1717
{ pattern: 'node_modules/traceur/bin/traceur.js', included: true, watched: false },
1818
{ pattern: 'node_modules/traceur/bin/traceur.js.map', included: false, watched: false },
19+
// System.js for module loading
1920
'node_modules/systemjs/dist/system.src.js',
20-
{ pattern: 'node_modules/systemjs/dist/system-polyfills.js', included: true, watched: false },
21-
{ pattern: 'node_modules/systemjs/dist/system-polyfills.js.map', included: false, watched: false },
2221

2322
// Polyfills
24-
'node_modules/es6-shim/es6-shim.js',
23+
'node_modules/core-js/client/shim.js',
24+
'node_modules/reflect-metadata/Reflect.js',
2525

26-
// Reflect and Zone.js
27-
{ pattern: 'node_modules/reflect-metadata/Reflect.js', included: true, watched: false },
28-
{ pattern: 'node_modules/reflect-metadata/Reflect.js.map', included: false, watched: false },
26+
// zone.js
2927
'node_modules/zone.js/dist/zone.js',
3028
'node_modules/zone.js/dist/long-stack-trace-zone.js',
3129
'node_modules/zone.js/dist/proxy.js',
@@ -34,21 +32,27 @@ module.exports = function(config){
3432
'node_modules/zone.js/dist/async-test.js',
3533
'node_modules/zone.js/dist/fake-async-test.js',
3634

35+
// RxJs
36+
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
37+
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
38+
39+
// Paths loaded via module imports:
40+
// Angular itself
41+
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
42+
{pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false},
43+
3744
// Angular and RxJS
38-
'node_modules/rxjs/bundles/Rx.js',
3945

4046
'tests/karma-test-shim.js',
4147

4248
{ pattern: 'samples/data/*.js', included: false, watched: false },
4349
{ pattern: 'samples/data/*.js.map', included: false, watched: false },
44-
{ pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
45-
{ pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
4650

4751
{ pattern: 'node_modules/@angular/**/*.js', included: false, watched: false },
4852
{ pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false },
4953

5054
// paths loaded via module imports
51-
{pattern: 'src/*', included: false, watched: true},
55+
{ pattern: 'src/*', included: false, watched: true },
5256

5357
// spec files need to be loaded in the shim file IN CONTEXT of the main module, don't include:
5458
{ pattern: 'tests/unit/**/*.js', included: false, watched: false },

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"module": "system",
4+
"module": "commonjs",
55
"moduleResolution": "node",
66
"sourceMap": true,
77
"emitDecoratorMetadata": true,

0 commit comments

Comments
 (0)