Update modules and dependencies, change to jsbi

* Drop gulp support
* Migrate long.js to JSBI library (for long math)
* Update karma targets
This commit is contained in:
Slava Bacherikov committed 2020-05-29 20:25:50 +03:00
1 parent 0fef378a11
commit b99bdd7c81
16 files changed
+3781 -4884

No files matched your search

+1 -1
View File
@@ -1,10 +1,10 @@
.*.sw[po] .*.sw[po]
*.py[co] *.py[co]
*.bak *.bak
.nyc_output/
upload/ upload/
build/ build/
temp/ temp/
typings/
typings.json typings.json
node_modules/ node_modules/
dist/ dist/
+2 -2
View File
@@ -2,7 +2,7 @@ sudo: false
dist: trusty dist: trusty
language: node_js language: node_js
node_js: node_js:
- '8' - '14'
env: env:
matrix: matrix:
- SAUCE=true - SAUCE=true
@@ -18,7 +18,7 @@ script:
- npm run browser-test - npm run browser-test
- npm run lint - npm run lint
after_sucess: after_sucess:
- ci/coveralls.sh - npm run send-coverage
git: git:
depth: 1 depth: 1
submodules: false submodules: false
-2
View File
@@ -1,2 +0,0 @@
#!/bin/sh
cat ./coverage/lcov.info | $(npm bin)/coveralls || true
-2
View File
@@ -1,2 +0,0 @@
var dataLayer;
-17
View File
@@ -1,17 +0,0 @@
/**
* @return {number}
* @nosideeffects
*/
Performance.prototype.mozNow = function() {};
/**
* @return {number}
* @nosideeffects
*/
Performance.prototype.oNow = function() {};
/**
* @return {number}
* @nosideeffects
*/
Performance.prototype.msNow = function() {};
-159
View File
@@ -1,159 +0,0 @@
/*
* Copyright 2017 The Closure Compiler Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Definitions for WebAssembly JS API
*
* @see http://webassembly.org/docs/js/
*
* @externs
* @author loorongjie@gmail.com (Loo Rong Jie)
*/
/**
* @const
*/
var WebAssembly = {};
/**
* @constructor
* @param {!BufferSource} bytes
*/
WebAssembly.Module = function(bytes) {};
/**
* @constructor
* @param {!WebAssembly.Module} moduleObject
* @param {Object=} importObject
*/
WebAssembly.Instance = function(moduleObject, importObject) {};
/**
* @typedef {{initial:number, maximum:(number|undefined)}}
*/
var MemoryDescriptor;
/**
* @constructor
* @param {MemoryDescriptor} memoryDescriptor
*/
WebAssembly.Memory = function(memoryDescriptor) {};
/**
* @typedef {{element:string, initial:number, maximum:(number|undefined)}}
*/
var TableDescriptor;
/**
* @constructor
* @param {TableDescriptor} tableDescriptor
*/
WebAssembly.Table = function(tableDescriptor) {};
/**
* @constructor
* @extends {Error}
*/
WebAssembly.CompileError = function() {};
/**
* @constructor
* @extends {Error}
*/
WebAssembly.LinkError = function() {};
/**
* @constructor
* @extends {Error}
*/
WebAssembly.RuntimeError = function() {};
// Note: Closure compiler does not support function overloading, omit this overload for now.
// {function(!WebAssembly.Module, Object=):!Promise<!WebAssembly.Instance>}
/**
* @param {!BufferSource} moduleObject
* @param {Object=} importObject
* @return {!Promise<{module:WebAssembly.Module, instance:WebAssembly.Instance}>}
*/
WebAssembly.instantiate = function(moduleObject, importObject) {};
/**
* @param {!BufferSource} bytes
* @return {!Promise<!WebAssembly.Module>}
*/
WebAssembly.compile = function(bytes) {};
/**
* @param {!BufferSource} bytes
* @return {boolean}
* @nosideeffects
*/
WebAssembly.validate = function(bytes) {};
/**
* @param {!WebAssembly.Module} moduleObject
* @return {!Array<{name:string, kind:string}>}
*/
WebAssembly.Module.exports = function(moduleObject) {};
/**
* @param {!WebAssembly.Module} moduleObject
* @return {!Array<{module:string, name:string, kind:string}>}
*/
WebAssembly.Module.imports = function(moduleObject) {};
/**
* @param {!WebAssembly.Module} moduleObject
* @param {string} sectionName
* @return {!Array<!ArrayBuffer>}
*/
WebAssembly.Module.customSections = function(moduleObject, sectionName) {};
WebAssembly.Instance.prototype.exports;
/**
* @param {number} delta
* @return {number}
*/
WebAssembly.Memory.prototype.grow = function(delta) {};
/**
* @type {!ArrayBuffer}
*/
WebAssembly.Memory.prototype.buffer;
/**
* @param {number} delta
* @return {number}
*/
WebAssembly.Table.prototype.grow = function(delta) {};
/**
* @type {number}
*/
WebAssembly.Table.prototype.length;
/**
* @param {number} index
* @return {function(...)}
*/
WebAssembly.Table.prototype.get = function(index) {};
/**
* @param {number} index
* @param {?function(...)} value
*/
WebAssembly.Table.prototype.set = function(index, value) {};
-92
View File
@@ -1,92 +0,0 @@
const gulp = require("gulp");
const ts = require("gulp-typescript");
const tslint = require("gulp-tslint");
const jasmine = require("gulp-jasmine");
const sourcemaps = require('gulp-sourcemaps');
const istanbul = require("gulp-istanbul");
const remapIstanbul = require("remap-istanbul/lib/gulpRemapIstanbul");
const tsProject = ts.createProject("tsconfig.json");
const del = require('del');
const { getWebpackConfig } = require('./webpack.base');
const webpack = require('webpack');
function coverage_build() {
return tsProject.src()
.pipe(sourcemaps.init())
.pipe(tsProject())
.js.pipe(sourcemaps.write('.', {includeContent: false}))
.pipe(gulp.dest("coverage-dist"));
};
const pre_coverage = gulp.series(coverage_build, function() {
return gulp.src(["coverage-dist/**/*.js"])
.pipe(istanbul())
.pipe(istanbul.hookRequire());
});
const coverage = gulp.series(coverage_build, pre_coverage, function() {
return gulp.src("coverage-dist/**/*.spec.js")
.pipe(jasmine())
.pipe(istanbul.writeReports({
dir: './coverage',
reporters: ['json'],
reportOpts: {
json: {dir: './coverage', file: 'coverage-js.json'}
}
})).on("end", function () {
return gulp.src('coverage/coverage-js.json')
.pipe(remapIstanbul({
basePath: 'src/',
reports: {
'json': './coverage/coverage.json',
'html': './coverage/html-report',
'lcovonly': './coverage/lcov.info',
'text': null
}
}));
});
});
function lint() {
return tsProject.src()
.pipe(tslint({"formatter": "verbose"}))
.pipe(tslint.report());
}
function clean(cb) {
del(['dist', 'test-dist', 'coverage-dist', 'coverage']).then(paths => cb());
}
function test_build() {
return tsProject.src().pipe(tsProject()).pipe(gulp.dest("test-dist"));
}
const test = gulp.series(test_build, function() {
return gulp.src("test-dist/**/*.spec.js").pipe(jasmine());
});
function build_webpack(gtag, cb) {
webpack(getWebpackConfig(true, gtag), (err, stats) => {
cb();
});
}
function clean_dist(cb) {
del(['dist']).then(paths => cb());
}
function build_prod(cb) {
build_webpack("UA-112154345-1", cb);
}
function build_stage(cb) {
build_webpack("UA-112154345-2", cb);
}
exports.lint = lint;
exports.clean = clean;
exports.test = test;
exports.coverage = coverage;
exports.build_prod = gulp.series(clean_dist, build_prod);
exports.build_stage = gulp.series(clean_dist, build_stage);
exports.default = gulp.parallel(lint, gulp.series(test, coverage));
+13
View File
@@ -0,0 +1,13 @@
{
"reporters": [{
"name": "jasmine-spec-reporter#SpecReporter",
"options": {
"displayStacktrace": "all"
}
}],
"spec_dir": "src",
"spec_files": ["**/*.spec.ts"],
"helpers": [
"./node_modules/babel-register/lib/node.js"
]
}
+6 -32
View File
@@ -1,52 +1,26 @@
module.exports = function(config) { module.exports = function(config) {
var customLaunchers = { var customLaunchers = {
sl_ie_10: {
base: "SauceLabs",
browserName: "internet explorer",
platform: "Windows 7",
version: "10"
},
sl_safari_7: {
base: "SauceLabs",
browserName: "safari",
platform: "OS X 10.10",
version: "8.0"
},
sl_ios_safari: { sl_ios_safari: {
base: 'SauceLabs', base: 'SauceLabs',
browserName: 'safari', browserName: 'safari',
platform: 'iOS', platform: 'iOS',
deviceName: 'iPhone 6 Simulator', deviceName: 'iPhone 7 Simulator',
version: '10.3', version: '10.3',
deviceOrientation: 'portrait' deviceOrientation: 'portrait'
}, },
sl_android: { sl_safari_7: {
base: "SauceLabs", base: "SauceLabs",
browserName: 'Browser', browserName: "safari",
patform: 'Android', platform: "OS X 10.11",
version: '5.1', version: "10.0"
deviceName: 'Android Emulator',
deviceOrientation: 'portrait'
},
sl_chrome_41: {
base: "SauceLabs",
browserName: 'chrome',
platform: 'Linux',
version: '41'
},
sl_firefox_8: {
base: "SauceLabs",
browserName: 'firefox',
platform: 'Linux',
version: '8.0'
}, },
sl_edge_13: { sl_edge_13: {
base: "SauceLabs", base: "SauceLabs",
browserName: 'MicrosoftEdge', browserName: 'MicrosoftEdge',
platform: 'Windows 10', platform: 'Windows 10',
version: '13.10586' version: '13.10586'
}, },
ChromeHeadlessTravis: { ChromeHeadlessTravis: {
base: "ChromeHeadless", base: "ChromeHeadless",
flags: ['--no-sandbox'] flags: ['--no-sandbox']
+3677 -4492
View File
File diff suppressed because it is too large. Load diff
+24 -27
View File
@@ -2,50 +2,47 @@
"name": "pwgen-for-bios", "name": "pwgen-for-bios",
"version": "2.0.0", "version": "2.0.0",
"description": "Password generator for BIOS", "description": "Password generator for BIOS",
"main": "decrypt_bios.js", "main": "src/ui.ts",
"browserlist": "> 0.25%, not dead",
"dependencies": { "dependencies": {
"long": "github:dcodeIO/long.js" "jsbi": "^3.1.2"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.10.1",
"@babel/preset-env": "^7.10.1",
"@types/jasmine": "^3.5.10", "@types/jasmine": "^3.5.10",
"@types/long": "^3.0.32", "babel-loader": "^8.1.0",
"gulp-jasmine": "^4.0.0",
"clean-webpack-plugin": "^3.0.0", "clean-webpack-plugin": "^3.0.0",
"closure-webpack-plugin": "^2.3.0",
"copy-webpack-plugin": "^5.1.1", "copy-webpack-plugin": "^5.1.1",
"coveralls": "^3.0.11", "coveralls": "^3.1.0",
"del": "^5.1.0",
"google-closure-compiler": "^20190819.0.0",
"gulp": "^4.0.2",
"gulp-istanbul": "^1.1.3",
"gulp-sourcemaps": "^2.6.4",
"gulp-tslint": "^8.1.3",
"gulp-typescript": "^5.0.1",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"istanbul": "^0.4.5", "jasmine": "^3.5.0",
"karma": "^4.4.1", "jasmine-spec-reporter": "^5.0.2",
"karma": "^5.0.9",
"karma-chrome-launcher": "^3.1.0", "karma-chrome-launcher": "^3.1.0",
"karma-firefox-launcher": "^1.3.0", "karma-firefox-launcher": "^1.3.0",
"karma-jasmine": "^2.0.1", "karma-jasmine": "^3.3.1",
"karma-sauce-launcher": "^1.2.0", "karma-sauce-launcher": "^1.2.0",
"karma-sourcemap-loader": "^0.3.7", "karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^4.0.2", "karma-webpack": "^4.0.2",
"remap-istanbul": "^0.13.0", "nyc": "^15.0.1",
"terser-webpack-plugin": "^3.0.2",
"ts-loader": "^6.2.2", "ts-loader": "^6.2.2",
"ts-node": "^8.10.2",
"tslint": "^5.20.1", "tslint": "^5.20.1",
"typescript": "^3.8.3", "typescript": "^3.9.3",
"webpack": "^4.42.1", "webpack": "^4.43.0",
"webpack-cli": "^3.3.11", "webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3" "webpack-dev-server": "^3.11.0"
}, },
"scripts": { "scripts": {
"test": "gulp test", "test": "ts-node ./node_modules/jasmine/bin/jasmine --config=jasmine.json",
"lint": "gulp lint", "lint": "tslint src/*.ts",
"cover": "gulp coverage", "cover": "nyc -r text -e .ts -x '**/*.spec.ts' npm test",
"clean": "gulp clean", "send-coverage": "nyc report --reporter=text-lcov | coveralls",
"all": "gulp default", "all": "npm test && npm run lint && npm run cover && npm run browser-test",
"build-prod": "gulp build_prod", "build-prod": "PRODUCTION=1 GOOGLE_ANALYTICS_TAG=UA-112154345-1 webpack",
"build-stage": "gulp build_stage", "build-stage": "PRODUCTION=1 GOOGLE_ANALYTICS_TAG=UA-112154345-2 webpack",
"browser-test": "karma start", "browser-test": "karma start",
"webpack": "webpack", "webpack": "webpack",
"dev-server": "webpack-dev-server" "dev-server": "webpack-dev-server"
+3 -3
View File
@@ -1,4 +1,4 @@
import * as Long from "long"; const JSBI = require("jsbi");
import { modularPow, sony4x4Keygen, sony4x4Solver } from "./sony_4x4"; import { modularPow, sony4x4Keygen, sony4x4Solver } from "./sony_4x4";
describe("Sony 4x4 BIOS Keygen", () => { describe("Sony 4x4 BIOS Keygen", () => {
@@ -30,9 +30,9 @@ describe("Sony 4x4 BIOS Solver", () => {
describe("test modularPow", () => { describe("test modularPow", () => {
it("4 ^ 13 mod 497 == 445", () => { it("4 ^ 13 mod 497 == 445", () => {
expect(modularPow(Long.fromInt(4), 13, 497)).toEqual(445); expect(modularPow(JSBI.BigInt(4), 13, 497)).toEqual(445);
}); });
it("100500 ^ 100500 mod 14 == 8", () => { it("100500 ^ 100500 mod 14 == 8", () => {
expect(modularPow(Long.fromInt(100500), 100500, 14)).toEqual(8); expect(modularPow(JSBI.BigInt(100500), 100500, 14)).toEqual(8);
}); });
}); });
+40 -32
View File
@@ -1,6 +1,8 @@
// based on dogbert's pwgen-sony-4x4.py // based on dogbert's pwgen-sony-4x4.py
/* tslint:disable:no-bitwise */ /* tslint:disable:no-bitwise */
import * as Long from "long"; import type JSBIT from "jsbi";
const JSBI = require("jsbi");
type JSBI = JSBIT;
import { makeSolver } from "./utils"; import { makeSolver } from "./utils";
const otpChars: string = "9DPK7V2F3RT6HX8J"; const otpChars: string = "9DPK7V2F3RT6HX8J";
@@ -35,73 +37,79 @@ function encodePassword(pwd: number[]): string {
} }
// http://numericalrecipes.blogspot.com/2009/03/modular-multiplicative-inverse.html // http://numericalrecipes.blogspot.com/2009/03/modular-multiplicative-inverse.html
function extEuclideanAlg(a: Long, b: Long): [Long, Long, Long] { function extEuclideanAlg(a: JSBI, b: JSBI): [JSBI, JSBI, JSBI] {
if (b.isZero()) { if (JSBI.EQ(b, 0)) {
return [new Long(1), new Long(0), a]; return [JSBI.BigInt(1), JSBI.BigInt(0), a];
} else { } else {
let [x, y, gcd] = extEuclideanAlg(b, a.mod(b)); let [x, y, gcd] = extEuclideanAlg(b, JSBI.remainder(a, b));
return [y, x.sub(y.mul(a.div(b))), gcd]; return [y, JSBI.subtract(x, JSBI.multiply(y, JSBI.divide(a, b))), gcd];
} }
} }
function modInvEuclid(a: Long, m: Long): Long | undefined { function modInvEuclid(a: JSBI, m: JSBI): JSBI | undefined {
let [x, , gcd] = extEuclideanAlg(a, m); let [x, , gcd] = extEuclideanAlg(a, m);
if (gcd.eq(1)) { if (JSBI.EQ(gcd, 1)) {
// hack for javascript modulo operation // hack for javascript modulo operation
// https://stackoverflow.com/questions/4467539/javascript-modulo-gives-a-negative-result-for-negative-numbers // https://stackoverflow.com/questions/4467539/javascript-modulo-gives-a-negative-result-for-negative-numbers
const temp = x.mod(m); const temp = JSBI.remainder(x, m);
return temp.gte(0) ? temp : temp.add(m); return JSBI.GE(temp, 0) ? temp : JSBI.ADD(temp, m);
} else { } else {
return undefined; return undefined;
} }
} }
// https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method // https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method
export function modularPow(base: Long, exponent: number, modulus: number): number { export function modularPow(base: JSBI, exponent: number, modulus: number | JSBI): number {
let result: Long = new Long(1, 0, true); let result: JSBI = JSBI.BigInt(1);
if (modulus === 1) { if (!(modulus instanceof JSBI)) {
modulus = JSBI.BigInt(modulus);
}
if (JSBI.EQ(modulus, 1)) {
return 0; return 0;
} }
base = base.mod(modulus); base = JSBI.remainder(base, modulus);
while (exponent > 0) { while (exponent > 0) {
if ((exponent & 1) === 1) { if ((exponent & 1) === 1) {
result = result.mul(base).mod(modulus); result = JSBI.remainder(JSBI.multiply(result, base), modulus);
} }
exponent = exponent >> 1; exponent = exponent >> 1;
base = base.mul(base).mod(modulus); base = JSBI.remainder(JSBI.multiply(base, base), modulus);
} }
return result.toNumber(); return JSBI.toNumber(result);
} }
function rsaDecrypt(code: number[]): number[] { function rsaDecrypt(code: number[]): number[] {
const low: number = arrayToNumber(code.slice(0, 4)); const low: JSBI = JSBI.BigInt(arrayToNumber(code.slice(0, 4)));
const high: number = arrayToNumber(code.slice(4, 8)); const high: JSBI = JSBI.BigInt(arrayToNumber(code.slice(4, 8)));
const c: Long = Long.fromBits(low, high, true); const c: JSBI = JSBI.bitwiseOr(JSBI.leftShift(high, JSBI.BigInt(32)), low);
const p: number = 2795287379; const p: number = 2795287379;
const q: number = 3544934711; const q: number = 3544934711;
const e = 41; const e = 41;
const phi = (new Long(p - 1, 0, true)).mul(q - 1); const phi: JSBI = JSBI.multiply(JSBI.BigInt(p - 1), JSBI.BigInt(q - 1));
const d: Long = modInvEuclid(new Long(e, 0, true), phi) as Long; const d: JSBI = modInvEuclid(JSBI.BigInt(e), phi) as JSBI;
const dp = d.mod(p - 1); const dp: JSBI = JSBI.remainder(d, JSBI.BigInt(p - 1));
const dq = d.mod(q - 1); const dq: JSBI = JSBI.remainder(d, JSBI.BigInt(q - 1));
const qinv: Long = modInvEuclid(new Long(q), new Long(p)) as Long; const qinv: JSBI = modInvEuclid(JSBI.BigInt(q), JSBI.BigInt(p)) as JSBI;
const m1 = modularPow(c, dp.toNumber(), p); const m1 = modularPow(c, JSBI.toNumber(dp), p);
const m2 = modularPow(c, dq.toNumber(), q); const m2 = modularPow(c, JSBI.toNumber(dq), q);
let h: Long; let h: JSBI;
if (m1 < m2) { if (m1 < m2) {
h = Long.fromValue(m1 - m2).add(p).mul(qinv).mod(p); h = JSBI.remainder(JSBI.multiply(JSBI.add(JSBI.BigInt(m1 - m2), JSBI.BigInt(p)), qinv), JSBI.BigInt(p));
} else { } else {
h = Long.fromValue(m1 - m2).mul(qinv).mod(p); h = JSBI.remainder(JSBI.multiply(JSBI.BigInt(m1 - m2), qinv), JSBI.BigInt(p));
} }
const m = h.mul(q).add(m2); const m: JSBI = JSBI.add(JSBI.multiply(h, JSBI.BigInt(q)), JSBI.BigInt(m2));
return numberToArray(m.low).concat(numberToArray(m.high)); return numberToArray(JSBI.toNumber(JSBI.asUintN(32, m))).concat(
numberToArray(JSBI.toNumber(JSBI.signedRightShift(m, JSBI.BigInt(32))))
);
} }
export function sony4x4Keygen(hash: string): string { export function sony4x4Keygen(hash: string): string {
+4 -2
View File
@@ -2,7 +2,8 @@
"compilerOptions": { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
"lib": ["dom", "es5"], "lib": ["dom", "es5"],
"target": "es3", "target": "es5",
"moduleResolution": "node",
"noImplicitAny": true, "noImplicitAny": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"noUnusedLocals": true, "noUnusedLocals": true,
@@ -11,7 +12,8 @@
"strict": true, "strict": true,
"sourceMap": true, "sourceMap": true,
"rootDir": "src/", "rootDir": "src/",
"outDir": "dist/" "outDir": "dist/",
"typeRoots": ["./typings", "./node_modules/@types/"]
}, },
"exclude": [ "exclude": [
"node_modules" "node_modules"
View File
File renamed without changes.
+11 -21
View File
@@ -1,30 +1,13 @@
const path = require('path'); const path = require('path');
const ClosurePlugin = require('closure-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const { DefinePlugin } = require('webpack'); const { DefinePlugin } = require('webpack');
const { exec } = require('child_process'); const { exec } = require('child_process');
const Terser = require('terser-webpack-plugin');
const fs = require('fs'); const fs = require('fs');
function makeClosureCompiler() {
const externDir = path.join(__dirname, "externs");
const externs = [
path.join(externDir, "googleAnalytics.js"),
path.join(externDir, "performance.js"),
path.join(externDir, "webassembly.js")
];
var flags = {
compilation_level: "ADVANCED",
externs: externs
};
return new ClosurePlugin({mode: 'STANDARD'}, flags);
}
class VersionInfoPlugin { class VersionInfoPlugin {
constructor(options = {}) { constructor(options = {}) {
if (options.filename == void 0) { if (options.filename == void 0) {
@@ -89,7 +72,6 @@ function getWebpackConfig(production, gtag) {
]; ];
if (production) { if (production) {
plugins.push(makeClosureCompiler());
webpackMode = "production"; webpackMode = "production";
} else { } else {
webpackMode = "development"; webpackMode = "development";
@@ -103,7 +85,10 @@ function getWebpackConfig(production, gtag) {
}, },
plugins: plugins, plugins: plugins,
optimization: { optimization: {
concatenateModules: false concatenateModules: false,
minimizer: [
new Terser({})
]
}, },
devtool: "source-map", devtool: "source-map",
devServer: { devServer: {
@@ -119,7 +104,12 @@ function getWebpackConfig(production, gtag) {
{ {
test: /\.ts$/, test: /\.ts$/,
exclude: /node_modules/, exclude: /node_modules/,
use: [{loader: 'ts-loader', options: {transpileOnly: true}}] use: [{loader: 'ts-loader', options: {transpileOnly: false}}]
},
{
test: /\.m?js$/,
exclude: /node_modules/,
use: [{loader: 'babel-loader', options: {presets: ['@babel/preset-env']}}]
} }
] ]
} }