@variousjs/create 3.3.2 → 3.4.0

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.
@@ -1,9 +1,9 @@
1
1
  import React, { FC } from 'react'
2
- import { ComponentProps, getConfig, ComponentNode, version } from '@variousjs/various'
2
+ import { VariousProps, getConfig, VariousFC, version } from '@variousjs/various'
3
3
  import { useNavigate } from 'react-router-dom'
4
4
  import { Config, Store } from '../../types'
5
5
 
6
- export const H: FC<ComponentProps<Store>> = () => {
6
+ export const H: FC<VariousProps<{}, Store>> = () => {
7
7
  const $config = getConfig() as Config
8
8
  const navigate = useNavigate()
9
9
 
@@ -29,4 +29,4 @@ export const S = ((props) => {
29
29
  <p>Version: {version}</p>
30
30
  </div>
31
31
  )
32
- }) as ComponentNode<Store>
32
+ }) as VariousFC<{}, Store>
@@ -1,4 +1,4 @@
1
1
  declare module '*.less' {
2
2
  const resource: Record<string, string>
3
- export = resource
3
+ export default resource
4
4
  }
package/tsconfig.json CHANGED
@@ -16,9 +16,7 @@
16
16
  "removeComments": true,
17
17
  "stripInternal": true,
18
18
  "resolveJsonModule": true,
19
- "strictPropertyInitialization": false,
20
- "paths": {
21
- }
19
+ "strictPropertyInitialization": false
22
20
  },
23
21
  "exclude": ["dist", "docs"]
24
22
  }
package/webpack/base.js CHANGED
@@ -34,9 +34,6 @@ const config = {
34
34
  resolve: {
35
35
  // 必须加上 .js,不然 webpack dev server 会报错找不到模块
36
36
  extensions: ['.js', '.ts', '.tsx'],
37
- alias: {
38
- '@': path.resolve(__dirname, '../src/shadcn-ui'),
39
- },
40
37
  },
41
38
  devServer: {
42
39
  allowedHosts: 'all',
@@ -64,6 +61,7 @@ const config = {
64
61
  {
65
62
  loader: 'css-loader',
66
63
  options: {
64
+ esModule: false,
67
65
  sourceMap: NODE_ENV === 'development',
68
66
  modules: {
69
67
  localIdentName: '[local]_[hash:base64:5]',
package/.eslintignore DELETED
@@ -1 +0,0 @@
1
- public/dist/
package/.eslintrc.js DELETED
@@ -1,43 +0,0 @@
1
- module.exports = {
2
- env: {
3
- browser: true,
4
- es2021: true,
5
- node: true,
6
- },
7
- extends: [
8
- 'eslint:recommended',
9
- 'plugin:react/recommended',
10
- ],
11
- settings: {
12
- 'import/resolver': {
13
- node: {
14
- extensions: ['.js', '.ts', '.tsx'],
15
- },
16
- typescript: {
17
- alwaysTryTypes: true,
18
- },
19
- },
20
- react: {
21
- version: '17',
22
- },
23
- },
24
- parser: '@typescript-eslint/parser',
25
- parserOptions: {
26
- ecmaFeatures: {
27
- jsx: true,
28
- },
29
- ecmaVersion: 12,
30
- sourceType: 'module',
31
- allowImportExportEverywhere: true,
32
- },
33
- plugins: [
34
- 'react',
35
- 'react-hooks',
36
- '@typescript-eslint',
37
- ],
38
- rules: {
39
- 'no-unused-vars': 'off',
40
- '@typescript-eslint/no-unused-vars': 'error',
41
- 'react/prop-types': 0,
42
- },
43
- }