@authing/guard-shim-react18 5.0.8-alpha.1 → 5.0.8-alpha.2
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.
- package/package.json +2 -8
- package/scripts/build.js +0 -22
- package/scripts/webpack.esm.config.js +0 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authing/guard-shim-react18",
|
|
3
|
-
"version": "5.0.8-alpha.
|
|
3
|
+
"version": "5.0.8-alpha.2",
|
|
4
4
|
"description": "Guard shim for react18",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"scripts": {
|
|
@@ -13,15 +13,9 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@types/react": "^17.0.43",
|
|
16
|
-
"@types/react-dom": "^17.0.14"
|
|
17
|
-
"css-loader": "^6.7.1",
|
|
18
|
-
"mini-css-extract-plugin": "^2.6.1",
|
|
19
|
-
"rimraf": "^2.6.2",
|
|
20
|
-
"ts-loader": "^9.3.1",
|
|
21
|
-
"webpack": "^5.72.0"
|
|
16
|
+
"@types/react-dom": "^17.0.14"
|
|
22
17
|
},
|
|
23
18
|
"peerDependencies": {
|
|
24
|
-
"axios": "^0.27.2",
|
|
25
19
|
"react": "^18.0.0",
|
|
26
20
|
"react-dom": "^18.0.0"
|
|
27
21
|
},
|
package/scripts/build.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
const rm = require('rimraf')
|
|
3
|
-
const webpack = require('webpack')
|
|
4
|
-
const webpackEsmBundlerConfig = require('./webpack.esm.config')
|
|
5
|
-
|
|
6
|
-
try {
|
|
7
|
-
rm.sync(path.resolve(__dirname, '../', 'dist'))
|
|
8
|
-
} catch (e) {
|
|
9
|
-
console.error('\n\n build guard, failed to delete dist directory, please operate manually \n\n')
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
readyGo()
|
|
13
|
-
|
|
14
|
-
function readyGo () {
|
|
15
|
-
webpack(webpackEsmBundlerConfig, (error, stats) => {
|
|
16
|
-
if (error) {
|
|
17
|
-
console.error('build guard-shim-react18 esm bundler error: ', error)
|
|
18
|
-
} else {
|
|
19
|
-
console.log(stats)
|
|
20
|
-
}
|
|
21
|
-
})
|
|
22
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
3
|
-
|
|
4
|
-
function resolve (dir, file = '') {
|
|
5
|
-
return path.resolve(__dirname, '../', dir, file)
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
module.exports = {
|
|
9
|
-
mode: 'production',
|
|
10
|
-
entry: resolve('src/index.tsx'),
|
|
11
|
-
output: {
|
|
12
|
-
filename: 'guard.min.js',
|
|
13
|
-
path: resolve('dist/esm'),
|
|
14
|
-
library: {
|
|
15
|
-
type: 'module'
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
experiments: {
|
|
19
|
-
outputModule: true
|
|
20
|
-
},
|
|
21
|
-
resolve: {
|
|
22
|
-
extensions: ['.ts', '.tsx', '.js']
|
|
23
|
-
},
|
|
24
|
-
module: {
|
|
25
|
-
rules: [
|
|
26
|
-
{
|
|
27
|
-
test: /\.css$/,
|
|
28
|
-
use: [MiniCssExtractPlugin.loader, 'css-loader']
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
test: /\.tsx?$/,
|
|
32
|
-
use: 'ts-loader',
|
|
33
|
-
exclude: /node_modules/
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
plugins: [
|
|
38
|
-
new MiniCssExtractPlugin({
|
|
39
|
-
filename: 'guard.min.css'
|
|
40
|
-
})
|
|
41
|
-
]
|
|
42
|
-
}
|