Skip to content

Commit bfd36df

Browse files
committed
fix: typings in live demo
1 parent bba4423 commit bfd36df

File tree

21 files changed

+94
-14
lines changed

21 files changed

+94
-14
lines changed

@next-plugin/next-auto-dynamic/__example__/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"moduleResolution": "node",
1212
"resolveJsonModule": true,
1313
"isolatedModules": true,
14+
"strictNullChecks": true,
1415
"jsx": "preserve",
1516
"paths": {
1617
"@/*": ["./*"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "CommonJS",
5+
"esModuleInterop": true,
6+
"strictNullChecks": true,
7+
"baseUrl": ".",
8+
"rootDir": ".",
9+
"paths": {
10+
"@/*": ["./resources/*"]
11+
},
12+
"typeRoots": ["./node_modules/@types"]
13+
},
14+
"include": ["**/*.ts", "**/*.d.ts", "../../typings/**/*.d.ts"]
15+
}

@webpack-plugin/cdn-upload-webpack-plugin/__example__/.stackblitzrc

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "CommonJS",
5+
"esModuleInterop": true,
6+
"strictNullChecks": true,
7+
"baseUrl": ".",
8+
"rootDir": ".",
9+
"paths": {
10+
"@/*": ["./resources/*"]
11+
},
12+
"typeRoots": ["./node_modules/@types"]
13+
},
14+
"include": ["**/*.ts", "**/*.d.ts", "../../typings/**/*.d.ts"]
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "CommonJS",
5+
"esModuleInterop": true,
6+
"strictNullChecks": true,
7+
"baseUrl": ".",
8+
"rootDir": ".",
9+
"paths": {
10+
"@/*": ["./resources/*"]
11+
},
12+
"typeRoots": ["./node_modules/@types"]
13+
},
14+
"include": ["**/*.ts", "**/*.d.ts", "../../typings/**/*.d.ts"]
15+
}

@webpack-plugin/crx-live-reload-webpack-plugin/__example__/webpack.config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { MemfsWebpackPlugin } from '@dumlj/memfs-webpack-plugin'
44
import { CrxLiveReloadWebpackPlugin } from '@dumlj/crx-live-reload-webpack-plugin'
55
import HtmlWebpackPlugin from 'html-webpack-plugin'
66

7+
import 'webpack-dev-server'
8+
79
const CONFIG: Configuration = {
810
mode: 'development',
911
entry: {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "CommonJS",
5+
"esModuleInterop": true,
6+
"strictNullChecks": true,
7+
"baseUrl": ".",
8+
"rootDir": ".",
9+
"paths": {
10+
"@/*": ["./resources/*"]
11+
},
12+
"typeRoots": ["./node_modules/@types"]
13+
},
14+
"include": ["**/*.ts", "**/*.d.ts", "../../typings/**/*.d.ts"]
15+
}

@webpack-plugin/crx-manifest-webpack-plugin/__example__/webpack.config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ const CONFIG: Configuration = {
3030
}
3131

3232
const files = MemfsWebpackPlugin.files
33-
const manifest = Object.keys(files).find((file) => path.relative(__dirname, file) === 'dist/manifest.json')
33+
const manifest = Object.keys(files).find((file) => path.relative(__dirname, file) === 'dist/manifest.json')!
3434
ok(`The following is the content of manifest.json.`, { verbose: false })
3535

3636
// eslint-disable-next-line no-console
37-
console.dir(JSON.parse(files[manifest].toString()), { depth: null, colors: true })
37+
console.dir(JSON.parse(files[manifest]!.toString()), { depth: null, colors: true })
3838
warn('Please compare the contents above and ./manifest.json.', { verbose: false })
3939
})
4040
},
@@ -61,6 +61,6 @@ CONFIG.output = {
6161
filename: '[name].js',
6262
}
6363

64-
CONFIG.plugins.push(new HtmlWebpackPlugin({ filename: 'popup.html' }))
64+
CONFIG.plugins!.push(new HtmlWebpackPlugin({ filename: 'popup.html' }))
6565

6666
export default CONFIG

@webpack-plugin/dts-webpack-plugin/__example__/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6+
"strictNullChecks": true,
67
"baseUrl": ".",
78
"rootDir": ".",
89
"paths": {

@webpack-plugin/dynamic-envs-webpack-plugin/__example__/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6+
"strictNullChecks": true,
67
"baseUrl": ".",
78
"rootDir": ".",
89
"paths": {

@webpack-plugin/dynamic-public-path-webpack-plugin/__example__/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6+
"strictNullChecks": true,
67
"baseUrl": ".",
78
"rootDir": ".",
89
"paths": {

@webpack-plugin/envs-switch-webpack-plugin/__example__/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6-
"moduleResolution": "Node",
6+
"strictNullChecks": true,
77
"baseUrl": ".",
88
"rootDir": ".",
99
"paths": {

@webpack-plugin/html-enhance-webpack-plugin/__example__/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6-
"moduleResolution": "Node",
6+
"strictNullChecks": true,
77
"baseUrl": ".",
88
"rootDir": ".",
99
"paths": {

@webpack-plugin/inject-entry-script-webpack-plugin/__example__/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6-
"moduleResolution": "Node",
6+
"strictNullChecks": true,
77
"baseUrl": ".",
88
"rootDir": ".",
99
"paths": {

@webpack-plugin/inject-entry-script-webpack-plugin/__example__/webpack.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const CONFIG: Configuration = {
3636

3737
const { '/dist/main.js': main, '/src/need-inject-script.js': inject } = files
3838
// eslint-disable-next-line no-console
39-
console.log(`\n${main.replace(inject, ($1) => chalk.white.bold($1))}\n`)
39+
console.log(`\n${main!.replace(inject!, ($1) => chalk.white.bold($1))}\n`)
4040

4141
info('The first half is used to getting envs and was automatically injected.', { verbose: false })
4242
})

@webpack-plugin/memfs-webpack-plugin/__example__/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6-
"moduleResolution": "Node",
6+
"strictNullChecks": true,
77
"baseUrl": ".",
88
"rootDir": ".",
99
"paths": {

@webpack-plugin/pretty-assets-tree-webpack-plugin/__example__/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6+
"strictNullChecks": true,
67
"baseUrl": ".",
78
"rootDir": ".",
89
"paths": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "CommonJS",
5+
"esModuleInterop": true,
6+
"strictNullChecks": true,
7+
"baseUrl": ".",
8+
"rootDir": ".",
9+
"paths": {
10+
"@/*": ["./resources/*"]
11+
},
12+
"typeRoots": ["./node_modules/@types"]
13+
},
14+
"include": ["**/*.ts", "**/*.d.ts", "../../typings/**/*.d.ts"]
15+
}

@webpack-plugin/stackblitz-webpack-plugin/__example__/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6+
"strictNullChecks": true,
67
"baseUrl": ".",
78
"rootDir": ".",
89
"paths": {

@webpack-plugin/zip-webpack-plugin/__example__/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "ES2022",
44
"module": "CommonJS",
55
"esModuleInterop": true,
6+
"strictNullChecks": true,
67
"baseUrl": ".",
78
"rootDir": ".",
89
"paths": {

@webpack-plugin/zip-webpack-plugin/__example__/webpack.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ const CONFIG: Configuration = {
4242
const main = 'main.zip'
4343
const buffer = await promisify(compiler.outputFileSystem.readFile)(`/${main}`)
4444
const jszip = new JSZip()
45-
const zip = await jszip.loadAsync(buffer)
45+
const zip = await jszip.loadAsync(buffer!)
4646
const files = Object.keys(zip.files)
4747
const tree = mapFilesToOrbitTree(files)
48-
const messages = [chalk.whiteBright.bold(main), ...stringifyOrbitTree(tree).map(({ orbit, content }) => [orbit, chalk.greenBright.bold(content)].join(' '))]
48+
const messages = [chalk.whiteBright.bold(main), ...stringifyOrbitTree(tree!).map(({ orbit, content }) => [orbit, chalk.greenBright.bold(content)].join(' '))]
4949
// eslint-disable-next-line no-console
5050
console.log(`\n${messages.join('\n')}\n`)
5151
})

0 commit comments

Comments
 (0)