Skip to content

Commit

Permalink
fix(cli): 更新默认模板
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Nov 21, 2019
1 parent 1096c72 commit 31a3305
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
12 changes: 1 addition & 11 deletions packages/taro-cli/templates/default/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,8 @@ const config = {
options: {
}
},
weapp: {
mini: {
postcss: {
autoprefixer: {

This comment has been minimized.

Copy link
@shenghanqin

shenghanqin Nov 21, 2019

Collaborator

为何要删掉autoprefixer,是因为小程序不需要呗?还是?

This comment has been minimized.

Copy link
@Garfield550

Garfield550 Nov 21, 2019

Collaborator

代码里有了默认的,如果用户需要修改的话再自己加,模版不需要这样做。
https://github.com/NervJS/taro/blob/feat_mini_webpack/packages/taro-mini-runner/src/webpack/postcss.conf.ts#L11-L17

enable: true,
config: {
browsers: [
'last 3 versions',
'Android >= 4.1',
'ios >= 8'
]
}
},
pxtransform: {
enable: true,
config: {
Expand Down
9 changes: 3 additions & 6 deletions packages/taro-cli/templates/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@
"@tarojs/taro-swan": "<%= version %>",
"@tarojs/taro-tt": "<%= version %>",
"@tarojs/taro-weapp": "<%= version %>",
"nervjs": "^1.5.0",
"nerv-devtools": "^1.5.0"
"nervjs": "^1.5.5",
"nerv-devtools": "^1.5.5"
},
"devDependencies": {
"@types/react": "^16.4.6",
"@types/webpack-env": "^1.13.6",
"@tarojs/plugin-babel": "<%= version %>",
"@tarojs/plugin-csso": "<%= version %>",<% if (css !== 'none') {%>
"@tarojs/plugin-<%= css %>": "<%= version %>",<%}%>
"@tarojs/plugin-uglifyjs": "<%= version %>",
"@tarojs/mini-runner": "<%= version %>",
"@tarojs/webpack-runner": "<%= version %>",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
Expand Down

0 comments on commit 31a3305

Please sign in to comment.