Skip to content

Commit

Permalink
fix(loading): can't export Loading in wechat
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCindy committed Aug 12, 2020
1 parent 793311f commit 3997d19
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 13 deletions.
20 changes: 20 additions & 0 deletions packages/loading/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

*~
*.swp
*.log

.DS_Store
.idea/
.temp/

build/
dist/
lib/
coverage/
es/
types/
node_modules/

demo/miniapp/components/
_miniapp/
6 changes: 5 additions & 1 deletion packages/loading/build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"plugins": [
[
"rax-plugin-api"
"build-plugin-rax-component",
{
"type": "rax",
"targets": ["web"]
}
]
]
}
25 changes: 15 additions & 10 deletions packages/loading/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "universal-loading",
"author": "rax",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"main": "lib/index.js",
"files": [
Expand All @@ -10,26 +10,31 @@
"dist"
],
"scripts": {
"start": "rax-scripts start",
"build": "rax-scripts build"
"start": "build-scripts start",
"build": "build-scripts build"
},
"pre-commit": [
"lint"
],
"keywords": [
"Rax"
"Rax",
"rax-component"
],
"engines": {
"npm": ">=3.0.0"
},
"peerDependencies": {
"rax": "^1.1.0"
},
"dependencies": {
"universal-env": "^2.0.0"
"universal-env": "^3.1.0"
},
"devDependencies": {
"rax": "^1.0.8",
"rax-plugin-api": "^0.2.0",
"rax-scripts": "^2.0.0",
"@types/eslint-visitor-keys": "^1.0.0",
"@types/json-schema": "^7.0.3"
"@alib/build-scripts": "^0.1.0",
"@types/rax": "^1.0.1",
"build-plugin-rax-component": "^0.2.0",
"rax": "^1.1.0",
"rax-test-renderer": "^1.0.0",
"typescript": "^3.7.5"
}
}
4 changes: 2 additions & 2 deletions packages/loading/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isMiniApp, isWeChatMiniprogram } from 'universal-env';
import { isMiniApp, isWeChatMiniProgram } from 'universal-env';
import * as miniAppModule from './miniapp/ali';
import * as weChatModule from './miniapp/wechat';

Expand All @@ -8,7 +8,7 @@ let Loading: Loading;
if (isMiniApp) {
Loading = miniAppModule;
}
if (isWeChatMiniprogram) {
if (isWeChatMiniProgram) {
Loading = weChatModule;
}

Expand Down

0 comments on commit 3997d19

Please sign in to comment.