pimath 0.0.127 → 0.0.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/.idea/jsLibraryMappings.xml +6 -0
  2. package/{public/index.html → dist/demo/exercises.html} +2 -2
  3. package/dist/demo/matrices.html +39 -0
  4. package/dist/demo/playground.html +20 -0
  5. package/dist/demo.css +3 -0
  6. package/dist/pimath.js +4239 -7819
  7. package/dist/pimath.umd.cjs +15 -0
  8. package/index.html +15 -0
  9. package/package.json +16 -8
  10. package/public/demo/exercises.html +283 -0
  11. package/public/demo/matrices.html +39 -0
  12. package/public/demo/playground.html +20 -0
  13. package/src/demo/exercises.ts +0 -0
  14. package/src/demo/matrices.ts +61 -0
  15. package/src/demo/playground.ts +153 -0
  16. package/src/{index.ts → main.ts} +1 -1
  17. package/src/maths/algebra/rational.ts +8 -4
  18. package/tsconfig.json +15 -4
  19. package/vite.config.js +23 -0
  20. package/webpack-production.config.js +22 -22
  21. package/webpack.config.js +22 -22
  22. package/dev/pimath.js +0 -7945
  23. package/dev/pimath.js.map +0 -1
  24. package/dist/pimath.js.map +0 -1
  25. package/dist/pimath.min.js +0 -2
  26. package/dist/pimath.min.js.map +0 -1
  27. package/esm/index.d.ts +0 -38
  28. package/esm/index.js +0 -44
  29. package/esm/index.js.map +0 -1
  30. package/esm/maths/algebra/equation.d.ts +0 -119
  31. package/esm/maths/algebra/equation.js +0 -797
  32. package/esm/maths/algebra/equation.js.map +0 -1
  33. package/esm/maths/algebra/linearSystem.d.ts +0 -39
  34. package/esm/maths/algebra/linearSystem.js +0 -279
  35. package/esm/maths/algebra/linearSystem.js.map +0 -1
  36. package/esm/maths/algebra/logicalset.d.ts +0 -28
  37. package/esm/maths/algebra/logicalset.js +0 -158
  38. package/esm/maths/algebra/logicalset.js.map +0 -1
  39. package/esm/maths/algebra/monom.d.ts +0 -206
  40. package/esm/maths/algebra/monom.js +0 -909
  41. package/esm/maths/algebra/monom.js.map +0 -1
  42. package/esm/maths/algebra/polynom.d.ts +0 -157
  43. package/esm/maths/algebra/polynom.js +0 -1305
  44. package/esm/maths/algebra/polynom.js.map +0 -1
  45. package/esm/maths/algebra/rational.d.ts +0 -46
  46. package/esm/maths/algebra/rational.js +0 -195
  47. package/esm/maths/algebra/rational.js.map +0 -1
  48. package/esm/maths/algebra/study/rationalStudy.d.ts +0 -28
  49. package/esm/maths/algebra/study/rationalStudy.js +0 -244
  50. package/esm/maths/algebra/study/rationalStudy.js.map +0 -1
  51. package/esm/maths/algebra/study.d.ts +0 -143
  52. package/esm/maths/algebra/study.js +0 -380
  53. package/esm/maths/algebra/study.js.map +0 -1
  54. package/esm/maths/coefficients/fraction.d.ts +0 -90
  55. package/esm/maths/coefficients/fraction.js +0 -517
  56. package/esm/maths/coefficients/fraction.js.map +0 -1
  57. package/esm/maths/coefficients/nthRoot.d.ts +0 -23
  58. package/esm/maths/coefficients/nthRoot.js +0 -137
  59. package/esm/maths/coefficients/nthRoot.js.map +0 -1
  60. package/esm/maths/geometry/circle.d.ts +0 -45
  61. package/esm/maths/geometry/circle.js +0 -324
  62. package/esm/maths/geometry/circle.js.map +0 -1
  63. package/esm/maths/geometry/line.d.ts +0 -99
  64. package/esm/maths/geometry/line.js +0 -485
  65. package/esm/maths/geometry/line.js.map +0 -1
  66. package/esm/maths/geometry/point.d.ts +0 -34
  67. package/esm/maths/geometry/point.js +0 -167
  68. package/esm/maths/geometry/point.js.map +0 -1
  69. package/esm/maths/geometry/triangle.d.ts +0 -91
  70. package/esm/maths/geometry/triangle.js +0 -276
  71. package/esm/maths/geometry/triangle.js.map +0 -1
  72. package/esm/maths/geometry/vector.d.ts +0 -41
  73. package/esm/maths/geometry/vector.js +0 -198
  74. package/esm/maths/geometry/vector.js.map +0 -1
  75. package/esm/maths/numeric.d.ts +0 -28
  76. package/esm/maths/numeric.js +0 -136
  77. package/esm/maths/numeric.js.map +0 -1
  78. package/esm/maths/numexp.d.ts +0 -19
  79. package/esm/maths/numexp.js +0 -186
  80. package/esm/maths/numexp.js.map +0 -1
  81. package/esm/maths/randomization/random.d.ts +0 -23
  82. package/esm/maths/randomization/random.js +0 -79
  83. package/esm/maths/randomization/random.js.map +0 -1
  84. package/esm/maths/randomization/randomCore.d.ts +0 -7
  85. package/esm/maths/randomization/randomCore.js +0 -22
  86. package/esm/maths/randomization/randomCore.js.map +0 -1
  87. package/esm/maths/randomization/rndFraction.d.ts +0 -12
  88. package/esm/maths/randomization/rndFraction.js +0 -44
  89. package/esm/maths/randomization/rndFraction.js.map +0 -1
  90. package/esm/maths/randomization/rndGeometryLine.d.ts +0 -12
  91. package/esm/maths/randomization/rndGeometryLine.js +0 -46
  92. package/esm/maths/randomization/rndGeometryLine.js.map +0 -1
  93. package/esm/maths/randomization/rndGeometryPoint.d.ts +0 -12
  94. package/esm/maths/randomization/rndGeometryPoint.js +0 -61
  95. package/esm/maths/randomization/rndGeometryPoint.js.map +0 -1
  96. package/esm/maths/randomization/rndHelpers.d.ts +0 -23
  97. package/esm/maths/randomization/rndHelpers.js +0 -98
  98. package/esm/maths/randomization/rndHelpers.js.map +0 -1
  99. package/esm/maths/randomization/rndMonom.d.ts +0 -12
  100. package/esm/maths/randomization/rndMonom.js +0 -53
  101. package/esm/maths/randomization/rndMonom.js.map +0 -1
  102. package/esm/maths/randomization/rndPolynom.d.ts +0 -13
  103. package/esm/maths/randomization/rndPolynom.js +0 -75
  104. package/esm/maths/randomization/rndPolynom.js.map +0 -1
  105. package/esm/maths/randomization/rndTypes.d.ts +0 -34
  106. package/esm/maths/randomization/rndTypes.js +0 -3
  107. package/esm/maths/randomization/rndTypes.js.map +0 -1
  108. package/esm/maths/shutingyard.d.ts +0 -59
  109. package/esm/maths/shutingyard.js +0 -443
  110. package/esm/maths/shutingyard.js.map +0 -1
  111. package/public/matrices.html +0 -100
  112. package/public/playground.html +0 -168
@@ -0,0 +1,39 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta content="width=device-width, initial-scale=1" name="viewport">
7
+ <title>Getting Started</title>
8
+
9
+ <script type="module" src="../../src/main.ts"></script>
10
+
11
+ <!-- KaTeX -->
12
+ <link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css"
13
+ integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" rel="stylesheet">
14
+
15
+ <!-- The loading of KaTeX is deferred to speed up page rendering -->
16
+ <script crossorigin="anonymous"
17
+ integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx"
18
+ src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js"></script>
19
+
20
+ <!-- To automatically render math in text elements, include the auto-render extension: -->
21
+ <script crossorigin="anonymous"
22
+ integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR"
23
+ onload="renderMathInElement(document.body);"
24
+ src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js"></script>
25
+
26
+ <link href="../demo.css" rel="stylesheet">
27
+ </head>
28
+
29
+ <body>
30
+
31
+ <div id="app">
32
+ </div>
33
+
34
+ <script type="module" src="../../src/demo/matrices.ts">
35
+ </script>
36
+
37
+ </body>
38
+
39
+ </html>
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Getting Started</title>
5
+ <script type="module" src="../../dist/pimath.js"></script>
6
+
7
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
8
+
9
+ <!-- The loading of KaTeX is deferred to speed up page rendering -->
10
+ <script src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"></script>
12
+ </head>
13
+ <body>
14
+
15
+ <div id="app"></div>
16
+
17
+ <script type="module" src="../../src/demo/playground.ts">
18
+ </script>
19
+ </body>
20
+ </html>
File without changes
@@ -0,0 +1,61 @@
1
+ function detMatrice(M: number[][]): { matrix: number[][], determinant: number } {
2
+ return {
3
+ matrix: M,
4
+ determinant: detnxn(M)
5
+ }
6
+ }
7
+
8
+ function det2x2(M: number[][]): number {
9
+ return M[0][0] * M[1][1] - M[1][0] * M[0][1]
10
+ }
11
+
12
+ function subMatrix(M: number[][], row: number, col: number) {
13
+ let subM = []
14
+
15
+ for (let r = 0; r < M.length; r++) {
16
+ if (r === row) {
17
+ continue
18
+ }
19
+
20
+ let subMrow = []
21
+ for (let c = 0; c < M[r].length; c++) {
22
+ if (c === col) {
23
+ continue
24
+ }
25
+ subMrow.push(M[r][c])
26
+ }
27
+ subM.push(subMrow)
28
+ }
29
+ return subM
30
+ }
31
+
32
+ function detnxn(M: number[][]) {
33
+ let result = 0
34
+
35
+ if (M.length === 2) {
36
+ result = det2x2(M)
37
+ } else {
38
+ for (let i = 0; i < M.length; i++) {
39
+ if (M[i][0] !== 0) {
40
+ result += M[i][0] * Math.pow(-1, i) * detnxn(subMatrix(M, i, 0))
41
+
42
+
43
+ }
44
+ }
45
+ }
46
+
47
+ return result
48
+ }
49
+
50
+ const M = detMatrice([
51
+ [0, 2, -1, 4, 0],
52
+ [3, 5, 0, 0, -2],
53
+ [0, -3, 1, 0, 0],
54
+ [0, 0, -4, 3, -3],
55
+ [-1, 0, 0, 1, 2]
56
+ ])
57
+
58
+ document.getElementById('app').innerHTML = `<p>\\[${M.matrix} = ${M.determinant}\\]</p>`;
59
+
60
+ // @ts-ignore
61
+ renderMathInElement(document.getElementById('app'))
@@ -0,0 +1,153 @@
1
+ import {Point} from "../maths/geometry/point.ts";
2
+ import {Line} from "../maths/geometry/line.ts";
3
+
4
+ let A = new Point(0, 2),
5
+ B = new Point(2, 3),
6
+ C = new Point(1 / 2, 4),
7
+ D = new Point(2, -1 / 2);
8
+
9
+ let L1 = new Line(A, B).simplifyDirection(),
10
+ L2 = new Line(C, D).simplifyDirection();
11
+
12
+ document.getElementById('app').innerHTML = `<p>\\( ${L1.tex.parametric} \\)</p>`;
13
+ document.getElementById('app').innerHTML += `<p>\\( ${L2.tex.parametric} \\)</p>`;
14
+
15
+ let I = L1.intersection(L2);
16
+ if (I.hasIntersection) {
17
+ document.getElementById('app').innerHTML += `<p>\\[ ${L1.intersection(L2).point.tex} \\]</p>`
18
+ } else if (I.isParallel) {
19
+ document.getElementById('app').innerHTML += `<p>Elles sont parallèles</p>`
20
+ } else if (I.isSame) {
21
+ document.getElementById('app').innerHTML += `<p>Elles sont confondues</p>`
22
+ }
23
+
24
+
25
+ // @ts-ignore
26
+ renderMathInElement(document.getElementById('app'), {fleqn: true});
27
+ /*let p;
28
+ p = new Pi.Polynom('3x(6x+9)+6(6x+9)');
29
+ document.getElementById('app').innerHTML = `<p>${p.raw}</p>`;
30
+ document.getElementById('app').innerHTML += `<p>${p.display}</p>`;
31
+
32
+ let v1 = new Pi.Vector('3 4'),
33
+ v2 = new Pi.Vector('-2 5');
34
+
35
+ console.log(v1);
36
+ console.log(v2);
37
+ console.log(Pi.Vector.scalarProduct(v1, v2));
38
+
39
+
40
+ let P = new Pi.Polynom('(x+5)(x-17)(37x+35)');
41
+ let Q = new Pi.Polynom('1');
42
+ P.factorize(100)
43
+
44
+ P.factors.forEach(n=> {
45
+ console.log(n.tex)
46
+ Q.multiply(n);
47
+ })
48
+
49
+ // Check that we have the same polynom.
50
+ console.log(P.tex);
51
+ console.log(Q.tex);
52
+
53
+
54
+
55
+
56
+
57
+ /*let n = new Pi.Polynom(),
58
+ d = new Pi.Polynom();
59
+ n.parse('(x+3)(x+4)');
60
+ d.parse('(x+3)(x-2)')
61
+
62
+ let r = new Pi.Rational(n, d);
63
+ document.getElementById('app').innerHTML = `<p>${r.tex}</p>`*/
64
+
65
+
66
+ /*
67
+ let M = new Pi.Monom().random('x', 2, false, false);
68
+ console.log(M.displayWithSign);
69
+
70
+ let S = new Pi.LinearSystem().parse(
71
+ 'x-3y=-2',
72
+ '4x+7x=1'
73
+ );
74
+ S.solve();
75
+ document.getElementById('app').innerHTML = `<p>${S.tex}</p>`;
76
+ document.getElementById('app').innerHTML += `<p>${S.texSolution}</p>`;
77
+ let S = new Pi.LinearSystem().generate(3,-5,2);
78
+ document.getElementById('app').innerHTML = `<p>${S.tex}</p>`;
79
+ S.solve();
80
+ S.log;
81
+ S.tex;
82
+
83
+ S = new Pi.LinearSystem().generate(-1,8,-2);
84
+ document.getElementById('app').innerHTML += `<p>${S.tex}</p>`;
85
+ S.solve();
86
+ S.log;
87
+
88
+ let P = new Pi.Polynom('3x^2+5yx-2');
89
+ console.log(P.tex);
90
+ console.log(P.numberOfVars);
91
+ P.replaceBy('y', new Pi.Polynom('2x+1'));
92
+ console.log(P.tex);
93
+
94
+ let A = new Pi.Equation('2x+3y=5');
95
+ console.log(A.tex);
96
+
97
+ A.isolate('x');
98
+ console.log(A.tex);
99
+
100
+ A.isolate('y');
101
+ console.log(A.tex);
102
+
103
+ let P = new Pi.Polynom().rndSimple(2).makeItComplicate();
104
+ console.log(P.tex);
105
+ console.log(P.texString);
106
+
107
+ let A = new Pi.Fraction().parse('2/5');
108
+ console.log(A.frac);
109
+
110
+ let F = new Pi.Fraction().parse('18/5');
111
+ let N = new Pi.Root().parse(F).reduce();
112
+ console.log(N.tex);
113
+
114
+ let E = new Pi.Equation().create(new Pi.Polynom().parse('x^2+6x-8'), new Pi.Polynom().zero());
115
+ E.solve();
116
+ console.log(E.solutions);
117
+
118
+ let D = 42;
119
+ console.log(Pi.Numeric.dividers(D));
120
+
121
+ let X = new Pi.Polynom().rndFactorable(2, false);
122
+ console.log(X.tex);
123
+ X.factors.forEach(function(P, i){
124
+ console.log(P.tex);
125
+ });
126
+
127
+ let EQ = new Pi.Equation('2x+3>=5x-2');
128
+ EQ.solve();
129
+ console.log(EQ.solution);
130
+
131
+ EQ.parseString('2x+3<5x-2');
132
+ EQ.solve();
133
+ console.log(EQ.solution);
134
+
135
+ EQ.parseString('7x+3>5x-2');
136
+ EQ.solve();
137
+ console.log(EQ.solution);
138
+
139
+ EQ.parseString('7x+3=<5x-2');
140
+ EQ.solve();
141
+ console.log(EQ.solution);
142
+
143
+ EQ.parseString('7x+3=<7x-2');
144
+ EQ.solve();
145
+ console.log(EQ.solution);
146
+
147
+ EQ.parseString('7x+3>7x-2');
148
+ EQ.solve();
149
+ console.log(EQ.solution);
150
+
151
+ EQ.parseString('x^2+6x+9>=0');
152
+ EQ.solve();
153
+ console.log(EQ.solution);*/
@@ -39,4 +39,4 @@ export const PiMath = {
39
39
  }
40
40
  };
41
41
 
42
- // (<any>window).Pi = PiMath
42
+ // (<any>window).PiMath = PiMath
@@ -62,6 +62,10 @@ export class Rational {
62
62
  return `\\frac{ ${this._numerator.texFactors} }{ ${this._denominator.texFactors} }`
63
63
  }
64
64
 
65
+ get displayFactors(): string {
66
+ return `(${this._numerator.displayFactors})/(${this._denominator.displayFactors})`;
67
+ }
68
+
65
69
  get plotFunction(): string {
66
70
  return `(${this._numerator.plotFunction})/(${this._denominator.plotFunction})`
67
71
  }
@@ -131,12 +135,12 @@ export class Rational {
131
135
  this._numerator.factorize();
132
136
  for (let f of this._numerator.factors) {
133
137
 
134
- if(f.degree().isZero()){
138
+ if (f.degree().isZero()) {
135
139
  // Do the simplify only if the factor can divide the denominator
136
- if(this._denominator.commonMonom().coefficient.clone().divide(f.monomByDegree().coefficient).isNatural()){
140
+ if (this._denominator.commonMonom().coefficient.clone().divide(f.monomByDegree().coefficient).isNatural()) {
137
141
  this.simplify(f);
138
142
  }
139
- }else {
143
+ } else {
140
144
  this.simplify(f);
141
145
  }
142
146
  }
@@ -234,7 +238,7 @@ export class Rational {
234
238
  return this._numerator.evaluateAsNumeric(values) / this._denominator.evaluateAsNumeric(values)
235
239
  }
236
240
 
237
- study = (config?:StudyConfig|string): RationalStudy => {
241
+ study = (config?: StudyConfig | string): RationalStudy => {
238
242
  return new RationalStudy(this, config)
239
243
  }
240
244
  }
package/tsconfig.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "src/maths/geometry/triangle.ts",
18
18
  "src/maths/geometry/vector.ts",
19
19
  "src/maths/numeric.ts",
20
- "src/maths/shutingyard.ts",
20
+ "src/maths/shutingyard.ts"
21
21
  ],
22
22
  "plugin": [
23
23
  "./typedoc.katex.js"
@@ -25,13 +25,24 @@
25
25
  "out": "docs"
26
26
  },
27
27
  "compilerOptions": {
28
+ "target": "es2021",
29
+ "useDefineForClassFields": true,
30
+ "module": "ESNext",
31
+ "lib": [
32
+ "ES2021",
33
+ "DOM",
34
+ "DOM.Iterable"
35
+ ],
36
+ "skipLibCheck": true,
37
+ "moduleResolution": "bundler",
38
+ "allowImportingTsExtensions": true,
39
+ "resolveJsonModule": true,
40
+ "isolatedModules": true,
41
+ "noEmit": true,
28
42
  "outDir": "./esm/",
29
43
  "noImplicitAny": true,
30
- "module": "commonjs",
31
- "target": "es2021",
32
44
  "allowJs": true,
33
45
  "sourceMap": true,
34
- "moduleResolution": "node",
35
46
  "declaration": true,
36
47
  "removeComments": false
37
48
  },
package/vite.config.js ADDED
@@ -0,0 +1,23 @@
1
+ import {defineConfig} from "vite";
2
+
3
+ export default defineConfig({
4
+ build: {
5
+ lib: {
6
+ entry: "src/main.ts",
7
+ name: "PiMath",
8
+ fileName: "pimath"
9
+ }
10
+ },
11
+ rollupOptions: {
12
+ external: ["vue"],
13
+ output: {
14
+ globals: {
15
+ vue: "Vue"
16
+ }
17
+ }
18
+ // input: {
19
+ // main: resolve(__dirname, "src/index.html"),
20
+ // playground: "src/demo/playground.html"
21
+ // }
22
+ }
23
+ })
@@ -1,26 +1,26 @@
1
1
  const path = require('path');
2
2
 
3
3
  module.exports = {
4
- mode: 'production',
5
- entry: './src/index.ts',
6
- devtool: 'source-map',
7
- module: {
8
- rules: [
9
- {
10
- test: /\.tsx?$/,
11
- use: 'ts-loader',
12
- exclude: /node_module/,
13
- },
14
- ],
15
- },
16
- resolve: {
17
- extensions: ['.tsx','.ts', '.js'],
18
- },
19
- output: {
20
- filename: 'pimath.js',
21
- path: path.resolve(__dirname, 'dist'),
22
- },
23
- optimization: {
24
- minimize: false
25
- }
4
+ mode: 'production',
5
+ entry: './src/main.ts',
6
+ devtool: 'source-map',
7
+ module: {
8
+ rules: [
9
+ {
10
+ test: /\.tsx?$/,
11
+ use: 'ts-loader',
12
+ exclude: /node_module/,
13
+ },
14
+ ],
15
+ },
16
+ resolve: {
17
+ extensions: ['.tsx', '.ts', '.js'],
18
+ },
19
+ output: {
20
+ filename: 'pimath.js',
21
+ path: path.resolve(__dirname, 'dist'),
22
+ },
23
+ optimization: {
24
+ minimize: false
25
+ }
26
26
  };
package/webpack.config.js CHANGED
@@ -1,26 +1,26 @@
1
1
  const path = require('path');
2
2
 
3
3
  module.exports = {
4
- mode: 'development',
5
- entry: './src/index.ts',
6
- devtool: 'source-map',
7
- module: {
8
- rules: [
9
- {
10
- test: /\.tsx?$/,
11
- use: 'ts-loader',
12
- exclude: /node_module/,
13
- },
14
- ],
15
- },
16
- resolve: {
17
- extensions: ['.tsx','.ts', '.js'],
18
- },
19
- output: {
20
- filename: 'pimath.js',
21
- path: path.resolve(__dirname, 'dev'),
22
- },
23
- optimization: {
24
- minimize: false
25
- }
4
+ mode: 'development',
5
+ entry: './src/main.ts',
6
+ devtool: 'source-map',
7
+ module: {
8
+ rules: [
9
+ {
10
+ test: /\.tsx?$/,
11
+ use: 'ts-loader',
12
+ exclude: /node_module/,
13
+ },
14
+ ],
15
+ },
16
+ resolve: {
17
+ extensions: ['.tsx', '.ts', '.js'],
18
+ },
19
+ output: {
20
+ filename: 'pimath.js',
21
+ path: path.resolve(__dirname, 'dev'),
22
+ },
23
+ optimization: {
24
+ minimize: false
25
+ }
26
26
  };