Skip to content

Commit

Permalink
feat(vite): taro 相关的依赖在小程序端打包成taro chunk & 修改 getComputedStyle、URL、do…
Browse files Browse the repository at this point in the history
…cument、window、history、location 浏览器环境中的全局对象的变量命名,避免 vite dev模式下的报错 (#16100)

* feat(mini): taro 相关的依赖在小程序端打包成taro chunk

* refactor: 修改 getComputedStyle、URL、document、window、history、location 浏览器环境中的全局对象的变量命名,避免 vite dev模式下的报错

* feat(template): 修改默认模版

* chore(release): publish 4.0.1-alpha.0 --tag=alpha

---------

Co-authored-by: liuzejia <[email protected]>
  • Loading branch information
ZEJIA-LIU and liuzejia authored Jul 15, 2024
1 parent a7fcf67 commit 360752b
Show file tree
Hide file tree
Showing 85 changed files with 109 additions and 112 deletions.
2 changes: 1 addition & 1 deletion crates/native_binding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/binding",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Node binding for taro",
"main": "binding.js",
"typings": "binding.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-darwin-arm64",
"description": "Native binding for taro",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-darwin-x64",
"description": "Native binding for taro",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-linux-x64-gnu",
"description": "Native binding for taro",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/binding-linux-x64-musl",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-win32-x64-msvc",
"description": "Native binding for taro",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"os": [
"win32"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taro",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "开放式跨端跨框架开发解决方案",
"homepage": "https://github.com/NervJS/taro#readme",
"author": "O2Team",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-react-jsx-to-rn-stylesheet",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Transform stylesheet selector to style in JSX Elements.",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-solid-jsx/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "babel-plugin-transform-solid-jsx",
"description": "A JSX to DOM plugin that wraps expressions for fine grained change detection",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-taroapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-taroapi",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"author": "O2Team",
"license": "MIT",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-taro",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro babel preset",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/create-app",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "create taro app with one command",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/css-to-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "taro-css-to-react-native",
"description": "Convert CSS text to a React Native stylesheet object",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"author": "O2Team",
"license": "MIT",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-taro",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro specific linting rules for ESLint",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-helper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-taro-helper",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "jest helper for taro",
"private": true,
"author": "O2Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-html-transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-html-transform",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "transform html tag name selector",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-plugin-constparse/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-plugin-constparse",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "parse constants defined in config",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-pxtransform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-pxtransform",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "PostCSS plugin px 转小程序 rpx及h5 rem 单位",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-unit-transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-taro-unit-transform",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "小程序单位转换",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/rollup-plugin-copy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rollup-plugin-copy",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "rollup-plugin-copy for taro",
"private": true,
"author": "O2Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/shared",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro utils internal use.",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-config-taro-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylelint-config-taro-rn",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Shareable stylelint config for React Native CSS modules",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-taro-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylelint-taro-rn",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "A collection of React Native specific rules for stylelint",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylelint-taro",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro stylelint 规则集合",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/api",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro common API",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-cli-convertor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/cli-convertor",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "cli tool for taro-convert",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/cli",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "cli tool for taro",
"author": "O2Team",
"license": "MIT",
Expand Down
9 changes: 0 additions & 9 deletions packages/taro-cli/templates/default/package.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,10 @@
"dev:jd": "npm run build:jd -- --watch",
"dev:harmony-hybrid": "npm run build:harmony-hybrid -- --watch"
},
{{#if (includes "Webpack5" s=compiler)}}
"browserslist": [
"defaults and fully supports es6-module",
"maintained node versions"
],
{{/if}}
{{#if (includes "Vite" s=compiler)}}
"browserslist": [
"last 3 versions",
"Android >= 4.1",
"ios >= 8"
],
{{/if}}
"author": "",
"dependencies": {
"@babel/runtime": "^7.24.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-advanced/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-advanced",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-library-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-library-react",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro 组件库 React 版本库",
"private": true,
"author": "O2Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-library-solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-library-solid",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro 组件库 Solid 版本库",
"private": true,
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-library-vue3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-library-vue3",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro 组件库 Vue3 版本库",
"private": true,
"author": "O2Team",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-react",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "",
"main:h5": "dist/index.js",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components-rn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components-rn",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "React Native 基础组件",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/components",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro 组件库",
"browser": "dist/index.js",
"main:h5": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-extend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/extend",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro extend functionality",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-framework-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/plugin-framework-react",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "React/Preact 框架插件",
"author": "O2Team",
"homepage": "https://github.com/nervjs/taro",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-framework-solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/plugin-framework-solid",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Solid 框架插件",
"author": "drchan",
"homepage": "https://github.com/nervjs/taro",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-framework-vue3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/plugin-framework-vue3",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Vue3 框架插件",
"author": "O2Team",
"homepage": "https://github.com/nervjs/taro",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-h5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/taro-h5",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro h5 framework",
"browser": "dist/index.js",
"main:h5": "dist/index.esm.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-helper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/helper",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro Helper",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/taro-loader",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Taro runner use webpack loader",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-platform-alipay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/plugin-platform-alipay",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "支付宝小程序平台插件",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-platform-h5/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/plugin-platform-h5",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Web 端平台插件",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-platform-harmony-hybrid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/plugin-platform-harmony-hybrid",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "Harmony 端平台插件",
"author": "O2Team",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-platform-harmony/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/plugin-platform-harmony-ets",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "OpenHarmony & 鸿蒙系统插件",
"author": "O2Team",
"homepage": "https://gitee.com/openharmony-sig/taro",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-platform-jd/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/plugin-platform-jd",
"version": "4.0.0",
"version": "4.0.1-alpha.0",
"description": "京东小程序平台插件",
"author": "O2Team",
"license": "MIT",
Expand Down
Loading

0 comments on commit 360752b

Please sign in to comment.