From: Eduardo San Martin Morote Date: Fri, 28 Jun 2019 15:54:07 +0000 (+0200) Subject: test: fix tsconfig for mocha tests X-Git-Tag: v4.0.0-alpha.0~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d441456523c5248a85c5e723603c66c961c6fb99;p=thirdparty%2Fvuejs%2Frouter.git test: fix tsconfig for mocha tests --- diff --git a/rollup.config.js b/rollup.config.js index 1e89557b..39d33167 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -76,6 +76,7 @@ function createEntry( compilerOptions: { // same for d.ts files declaration: format === 'es' && isBrowser && !minify, + module: 'esnext', // we need to override it because mocha requires this value to be commonjs target: format === 'iife' || format === 'cjs' ? 'es3' : 'esnext', }, }, diff --git a/tsconfig.json b/tsconfig.json index b78a6bdf..927a40dc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,8 @@ "compilerOptions": { /* Basic Options */ "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, - "module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + // Necessary for tests with mocha + "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, // "lib": ["es2017.object"] /* Specify library files to be included in the compilation. */, // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */