emacroh5lib 1.0.91 → 1.0.95

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.
@@ -8,7 +8,7 @@ describe('HelloWorld.vue', () => {
8
8
  const wrapper = shallowMount(HelloWorld, {
9
9
  propsData: { msg }
10
10
  })
11
-
11
+
12
12
  expect(wrapper.text()).toMatch(msg)
13
13
  })
14
14
  })
@@ -18,11 +18,8 @@ describe('HelloWorld.mounted', () => {
18
18
 
19
19
  const HelloWorldVue = Vue.extend(HelloWorld);
20
20
  const ListComponent = new HelloWorldVue().$mount();
21
-
21
+
22
22
  it('调用方法', () => {
23
-
24
23
  console.info(ListComponent);
25
-
26
-
27
24
  })
28
25
  })
package/tsconfig.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "declarationDir": "./dist/types/", // 声明文件打包的位置
11
11
  "declarationMap": false, // 是否生成声明文件map文件(便于调试)
12
12
  "moduleResolution": "node",
13
- "module": "esnext",
13
+ "module": "es6",
14
14
  "target": "es6", // 转化成的目标语言
15
15
  "baseUrl": "./",
16
16
  "strict": true,
@@ -21,7 +21,10 @@
21
21
  "allowSyntheticDefaultImports": true,
22
22
  "forceConsistentCasingInFileNames": true,
23
23
  "useDefineForClassFields": true,
24
+ "useUnknownInCatchVariables": false,
24
25
  "types": [
26
+ "jest",
27
+ "node"
25
28
  ],
26
29
  "paths": {
27
30
  "@/*": [
@@ -33,13 +36,13 @@
33
36
  "./node_modules/@types"
34
37
  ],
35
38
  "lib": [
36
- "dom",
37
- "es2015",
38
- "esnext",
39
- "dom.iterable",
40
- "scripthost"
39
+ "ES6",
40
+ "DOM",
41
+ "DOM.Iterable",
42
+ "ESNext",
43
+ "ES5"
41
44
  ],
42
- "allowJs": false
45
+ "allowJs": true
43
46
  },
44
47
  "include": [
45
48
  "src/**/*.ts",
package/webpack.config.js CHANGED
@@ -88,7 +88,7 @@ const config = {
88
88
  ]
89
89
  },
90
90
  {
91
- test: /\.(ts|tsx)$/i,
91
+ test: /\.(ts)$/i,
92
92
  loader: "ts-loader",
93
93
  options: {
94
94
  appendTsSuffixTo: [/\.(vue)$/],
@@ -96,6 +96,16 @@ const config = {
96
96
  },
97
97
  exclude: ["/node_modules/"],
98
98
  },
99
+ {
100
+ test: /\.(tsx|jsx)$/i,
101
+ exclude: { and: [/node_modules/] },
102
+ loader: require.resolve('babel-loader'),
103
+ options: { // babel中的配置
104
+ presets: ['@babel/preset-env'], // ...babelConfig.presets,
105
+ plugins: [], // ...babelConfig.plugins,
106
+ // ... babelConfig.others
107
+ }
108
+ },
99
109
  {
100
110
  test: /\.less$/i,
101
111
  use: ['style-loader', 'css-loader', 'less-loader'],
@@ -138,7 +148,7 @@ module.exports = () => {
138
148
  }
139
149
 
140
150
  // 打包文件大小配置
141
- config.performance = {
151
+ config.performance = {
142
152
  maxEntrypointSize: 1024 * 1024,
143
153
  maxAssetSize: 1024 * 1024 * 1
144
154
  }