You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Specifies TypeScript compiler to allow JavaScript files to be included in the compilation process. => good to use if want to incrementally convert javascript to typescript files
46
+
"allowJs": true,
47
+
48
+
// Specifies the module resolution strategy to use.
16
49
"moduleResolution": "node",
50
+
51
+
// Enables TypeScript to import JSON files as modules.
// Skip type checking of type declartion files (.d.ts files) that are included with TypeScript. If we trust the type definition of our imported file, turn this flag on => reduce compiling time.
67
+
"skipLibCheck": true
19
68
},
69
+
70
+
// Specifies which files should be included in the compilation.
// Specifies options for TypeDoc, a documentation generator for TypeScript. In this case, it tells TypeDoc to generate documentation for the project in "file" mode, and to output the documentation to a "docs" folder.
// use a "multi-main entry" to inject multiple dependent files together
8
13
// and graph their dependencies into one "chunk"
9
14
entry: {
10
-
// app: './src/app/index.js',
11
15
app: './src/app/index.tsx',
12
16
background: './src/extension/background.js',
13
17
content: './src/extension/contentScript.ts',
14
-
backend: './src/backend/index.ts'
18
+
backend: './src/backend/index.ts',
15
19
},
20
+
/**
21
+
* Bundle each entry point into one "chunk" & store it in the extension/build/bundles folder
22
+
* When load the unpacked extension in the chrome extension store, the src/extension/build folder is selected => load all bundles (app, backend, background & content script)
* 1 .css and .scss files will be evaluated first will use the style-loader and css-loader, as well as the sass-loader (only applicable for .scss files).
37
+
* 2 .tsx and .ts files will be evaluated third and will use the ts-loader.
38
+
* 3 .jsx and .js files will be evaluated last and will use the babel-loader to transpile them into code that is compatible with older browsers.
39
+
*/
25
40
rules: [
41
+
/**
42
+
* For all files ending .js or .jsx, except those in node_modules
43
+
* => transpile them into code that is compatible with older browser using babel-loader
0 commit comments