Skip to content

Commit

Permalink
build(taro-components): 添加 H5 组件 stencil 构建 sourceMap 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
beezen authored and ZakaryCode committed Sep 9, 2022
1 parent b3a79ac commit ef0c2e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/taro-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"collection:main": "dist/collection/index.js",
"scripts": {
"build-h5": "babel -d dist-h5 h5",
"build": "pnpm run build-h5 & stencil build --config stencil.config.ts",
"dev": "stencil build --config stencil.config.ts --watch",
"build": "pnpm run build-h5 & cross-env NODE_ENV=production stencil build --config stencil.config.ts",
"dev": "cross-env NODE_ENV=development stencil build --config stencil.config.ts --watch",
"test": "karmatic --files '__tests__/setup.js,__tests__/**.spec.js' --coverage false",
"test:ci": "karmatic --files '__tests__/setup.js,__tests__/**.spec.js' --coverage false",
"test:debug": "karmatic debug --files '__tests__/setup.js,__tests__/**.spec.js' --coverage false",
Expand Down
1 change: 1 addition & 0 deletions packages/taro-components/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const config: Config = {
plugins: [
sass()
],
sourceMap: process.env.NODE_ENV === 'development',
nodeResolve: {
preferBuiltins: false,
// @ts-ignore
Expand Down
6 changes: 3 additions & 3 deletions packages/taro-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"jsx": "react",
"jsxFactory": "h",
"module": "ESNext",
"sourceMap": false,
"typeRoots": ["./node_modules/@types"],
"sourceMap": true,
"typeRoots": ["./node_modules/@types"]
},
"include": ["./src", "./types"],
"include": ["./src", "./types"]
}

0 comments on commit ef0c2e3

Please sign in to comment.