diff --git a/.changeset/dull-flowers-boil.md b/.changeset/dull-flowers-boil.md new file mode 100644 index 000000000..59f6d9e4e --- /dev/null +++ b/.changeset/dull-flowers-boil.md @@ -0,0 +1,36 @@ +--- +'@ice/plugin-css-assets-local': patch +'@ice/plugin-moment-locales': patch +'@ice/miniapp-react-dom': patch +'@ice/plugin-rax-compat': patch +'@ice/miniapp-runtime': patch +'@ice/plugin-icestark': patch +'@ice/plugin-jsx-plus': patch +'@ice/miniapp-loader': patch +'@ice/plugin-miniapp': patch +'@ice/plugin-request': patch +'@ice/route-manifest': patch +'@ice/webpack-config': patch +'@ice/webpack-modify': patch +'@ice/plugin-canvas': patch +'@ice/plugin-fusion': patch +'@ice/rspack-config': patch +'@ice/shared-config': patch +'@ice/cache-canvas': patch +'@ice/plugin-store': patch +'@ice/style-import': patch +'@ice/jsx-runtime': patch +'@ice/plugin-antd': patch +'@ice/plugin-auth': patch +'@ice/plugin-i18n': patch +'create-ice': patch +'@ice/plugin-pha': patch +'rax-compat': patch +'@ice/bundles': patch +'@ice/runtime': patch +'@ice/appear': patch +'@ice/shared': patch +'@ice/app': patch +--- + +fix: sourceMap url in prod files but not publish with sourceMap file diff --git a/packages/appear/package.json b/packages/appear/package.json index b89c5f19c..ec1ac59ca 100644 --- a/packages/appear/package.json +++ b/packages/appear/package.json @@ -5,7 +5,7 @@ "main": "./esm/index.js", "types": "./esm/index.d.ts", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc", "prepublishOnly": "npm run build" }, diff --git a/packages/bundles/package.json b/packages/bundles/package.json index 44fead21d..f5c5b9845 100644 --- a/packages/bundles/package.json +++ b/packages/bundles/package.json @@ -9,7 +9,7 @@ "compiled" ], "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsx scripts/build.ts && tsc" }, "main": "./esm/index.js", diff --git a/packages/cache-canvas/package.json b/packages/cache-canvas/package.json index 3654b8cd4..f01f6029c 100644 --- a/packages/cache-canvas/package.json +++ b/packages/cache-canvas/package.json @@ -5,7 +5,7 @@ "main": "./esm/index.js", "types": "./esm/index.d.ts", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc", "prepublishOnly": "npm run build" }, diff --git a/packages/create-ice/package.json b/packages/create-ice/package.json index ebae3f158..949c27706 100644 --- a/packages/create-ice/package.json +++ b/packages/create-ice/package.json @@ -20,7 +20,7 @@ "npm": ">=3.0.0" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "dependencies": { diff --git a/packages/ice/package.json b/packages/ice/package.json index b876a1386..1673d8fef 100644 --- a/packages/ice/package.json +++ b/packages/ice/package.json @@ -27,7 +27,7 @@ "npm": ">=3.0.0" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc", "postinstall": "node ./scripts/postinstall.mjs" }, diff --git a/packages/jsx-runtime/build.config.mts b/packages/jsx-runtime/build.config.mts index 94b594e9b..dbc07b189 100644 --- a/packages/jsx-runtime/build.config.mts +++ b/packages/jsx-runtime/build.config.mts @@ -4,4 +4,5 @@ export default defineConfig({ transform: { formats: ['esm'], }, + sourceMaps: process.env.NODE_ENV === 'development', }); diff --git a/packages/jsx-runtime/package.json b/packages/jsx-runtime/package.json index 37aa2d065..89cbc0770 100644 --- a/packages/jsx-runtime/package.json +++ b/packages/jsx-runtime/package.json @@ -24,8 +24,8 @@ "*.css" ], "scripts": { - "watch": "ice-pkg start", - "build": "ice-pkg build", + "watch": "cross-env NODE_ENV=development ice-pkg start", + "build": "cross-env NODE_ENV=production ice-pkg build", "prepublishOnly": "npm run build" }, "keywords": [ @@ -40,6 +40,7 @@ "@ice/pkg": "^1.5.0", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", + "cross-env": "^7.0.3", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/packages/miniapp-loader/package.json b/packages/miniapp-loader/package.json index aabcec9c7..8b42ea639 100644 --- a/packages/miniapp-loader/package.json +++ b/packages/miniapp-loader/package.json @@ -13,7 +13,7 @@ "bugs": "https://github.com/alibaba/ice/issues", "homepage": "https://v3.ice.work", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "sideEffects": false, diff --git a/packages/miniapp-react-dom/package.json b/packages/miniapp-react-dom/package.json index 8708b4c32..2757558ed 100644 --- a/packages/miniapp-react-dom/package.json +++ b/packages/miniapp-react-dom/package.json @@ -18,7 +18,7 @@ "bugs": "https://github.com/alibaba/ice/issues", "homepage": "https://v3.ice.work", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "sideEffects": false, diff --git a/packages/miniapp-runtime/package.json b/packages/miniapp-runtime/package.json index e440f1920..062791419 100644 --- a/packages/miniapp-runtime/package.json +++ b/packages/miniapp-runtime/package.json @@ -20,7 +20,7 @@ "bugs": "https://github.com/alibaba/ice/issues", "homepage": "https://v3.ice.work", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "sideEffects": false, diff --git a/packages/plugin-antd/package.json b/packages/plugin-antd/package.json index 55ab1bcab..f53bd6db7 100644 --- a/packages/plugin-antd/package.json +++ b/packages/plugin-antd/package.json @@ -4,7 +4,7 @@ "description": "ice.js plugin for use antd", "type": "module", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "main": "./esm/index.js", diff --git a/packages/plugin-auth/package.json b/packages/plugin-auth/package.json index 90dbce8ba..d7bfd953c 100644 --- a/packages/plugin-auth/package.json +++ b/packages/plugin-auth/package.json @@ -54,7 +54,7 @@ "url": "https://github.com/alibaba/ice/tree/master/packages/plugin-auth" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/plugin-cavans/package.json b/packages/plugin-cavans/package.json index b22bcb088..360c28335 100644 --- a/packages/plugin-cavans/package.json +++ b/packages/plugin-cavans/package.json @@ -40,7 +40,7 @@ "url": "https://github.com/alibaba/ice/tree/master/packages/plugin-canvas" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/plugin-css-assets-local/package.json b/packages/plugin-css-assets-local/package.json index 9bffcfb8a..6cbf616f3 100644 --- a/packages/plugin-css-assets-local/package.json +++ b/packages/plugin-css-assets-local/package.json @@ -28,7 +28,7 @@ "@ice/app": "^3.1.2" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/plugin-fusion/package.json b/packages/plugin-fusion/package.json index 6fa750327..aaf21adb7 100644 --- a/packages/plugin-fusion/package.json +++ b/packages/plugin-fusion/package.json @@ -24,7 +24,7 @@ "access": "public" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" } } diff --git a/packages/plugin-i18n/build.config.mts b/packages/plugin-i18n/build.config.mts index c91fc6b44..bb61d1170 100644 --- a/packages/plugin-i18n/build.config.mts +++ b/packages/plugin-i18n/build.config.mts @@ -5,4 +5,5 @@ export default defineConfig({ transform: { formats: ['es2017'], }, + sourceMaps: process.env.NODE_ENV === 'development', }); diff --git a/packages/plugin-i18n/package.json b/packages/plugin-i18n/package.json index 89e592723..498e5e5bd 100644 --- a/packages/plugin-i18n/package.json +++ b/packages/plugin-i18n/package.json @@ -30,8 +30,8 @@ }, "sideEffects": false, "scripts": { - "watch": "ice-pkg start", - "build": "ice-pkg build" + "watch": "cross-env NODE_ENV=development ice-pkg start", + "build": "cross-env NODE_ENV=production ice-pkg build" }, "keywords": [ "ice.js", @@ -52,6 +52,7 @@ "@remix-run/router": "^1.6.1", "@types/accept-language-parser": "^1.5.3", "@types/react": "^18.0.33", + "cross-env": "^7.0.3", "webpack-dev-server": "^4.13.2" }, "peerDependencies": { diff --git a/packages/plugin-icestark/package.json b/packages/plugin-icestark/package.json index 09eb8b850..a671bd9fd 100644 --- a/packages/plugin-icestark/package.json +++ b/packages/plugin-icestark/package.json @@ -54,7 +54,7 @@ "url": "https://github.com/alibaba/ice/tree/master/packages/plugin-icestark" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/plugin-jsx-plus/package.json b/packages/plugin-jsx-plus/package.json index bb11bc120..178982515 100644 --- a/packages/plugin-jsx-plus/package.json +++ b/packages/plugin-jsx-plus/package.json @@ -37,7 +37,7 @@ "url": "https://github.com/alibaba/ice/tree/master/packages/plugin-jsx-plus" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "dependencies": { diff --git a/packages/plugin-miniapp/package.json b/packages/plugin-miniapp/package.json index f6be295cb..482f02cfb 100644 --- a/packages/plugin-miniapp/package.json +++ b/packages/plugin-miniapp/package.json @@ -29,7 +29,7 @@ "template" ], "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "dependencies": { diff --git a/packages/plugin-moment-locales/package.json b/packages/plugin-moment-locales/package.json index de9f62ac6..b8e6e025f 100644 --- a/packages/plugin-moment-locales/package.json +++ b/packages/plugin-moment-locales/package.json @@ -4,7 +4,7 @@ "description": "ice.js plugin for reduce moment locale size.", "type": "module", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "main": "./esm/index.js", diff --git a/packages/plugin-pha/package.json b/packages/plugin-pha/package.json index 8579fca56..65b8a023b 100644 --- a/packages/plugin-pha/package.json +++ b/packages/plugin-pha/package.json @@ -13,7 +13,7 @@ "*.d.ts" ], "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "dependencies": { diff --git a/packages/plugin-rax-compat/package.json b/packages/plugin-rax-compat/package.json index cc945f8da..c891c8bb3 100644 --- a/packages/plugin-rax-compat/package.json +++ b/packages/plugin-rax-compat/package.json @@ -39,7 +39,7 @@ "url": "https://github.com/alibaba/ice/tree/master/packages/plugin-rax-compat" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc && cp src/rax-compat.d.ts esm/rax-compat.d.ts" }, "publishConfig": { diff --git a/packages/plugin-request/package.json b/packages/plugin-request/package.json index ba414e248..84846958d 100644 --- a/packages/plugin-request/package.json +++ b/packages/plugin-request/package.json @@ -68,7 +68,7 @@ "url": "https://github.com/alibaba/ice/tree/master/packages/plugin-request" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/plugin-store/package.json b/packages/plugin-store/package.json index 4203fbbb6..43d7c8fa2 100644 --- a/packages/plugin-store/package.json +++ b/packages/plugin-store/package.json @@ -62,7 +62,7 @@ "url": "https://github.com/alibaba/ice/tree/master/packages/plugin-store" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/rax-compat/build.config.mts b/packages/rax-compat/build.config.mts index 40f7dbbc0..0bc2d21ea 100644 --- a/packages/rax-compat/build.config.mts +++ b/packages/rax-compat/build.config.mts @@ -4,4 +4,5 @@ export default defineConfig({ transform: { formats: ['esm', 'es2017'], }, + sourceMaps: process.env.NODE_ENV === 'development', }); diff --git a/packages/rax-compat/package.json b/packages/rax-compat/package.json index 850ed2662..3bfd77fd3 100644 --- a/packages/rax-compat/package.json +++ b/packages/rax-compat/package.json @@ -33,8 +33,8 @@ "*.css" ], "scripts": { - "watch": "ice-pkg start", - "build": "ice-pkg build", + "watch": "cross-env NODE_ENV=development ice-pkg start", + "build": "cross-env NODE_ENV=production ice-pkg build", "prepublishOnly": "npm run build", "eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./", "eslint:fix": "npm run eslint -- --fix", @@ -58,6 +58,7 @@ "@types/rax": "^1.0.8", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", + "cross-env": "^7.0.3", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/packages/route-manifest/package.json b/packages/route-manifest/package.json index 4f50c202e..50fb79bea 100644 --- a/packages/route-manifest/package.json +++ b/packages/route-manifest/package.json @@ -18,7 +18,7 @@ "minimatch": "^5.0.1" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/rspack-config/package.json b/packages/rspack-config/package.json index 58c95e583..e11b9ad1e 100644 --- a/packages/rspack-config/package.json +++ b/packages/rspack-config/package.json @@ -22,7 +22,7 @@ "@rspack/core": "^0.3.0" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/runtime/package.json b/packages/runtime/package.json index 459946860..080a1049e 100644 --- a/packages/runtime/package.json +++ b/packages/runtime/package.json @@ -32,7 +32,7 @@ "bugs": "https://github.com/alibaba/ice/issues", "homepage": "https://v3.ice.work", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc", "postinstall": "node ./scripts/postinstall.mjs" }, diff --git a/packages/shared-config/package.json b/packages/shared-config/package.json index 27e058ba3..dded238f9 100644 --- a/packages/shared-config/package.json +++ b/packages/shared-config/package.json @@ -31,7 +31,7 @@ "webpack-dev-server": "^4.7.4" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/shared/package.json b/packages/shared/package.json index 15e428693..72d26bb15 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -18,7 +18,7 @@ "bugs": "https://github.com/alibaba/ice/issues", "homepage": "https://v3.ice.work", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "sideEffects": false, diff --git a/packages/style-import/package.json b/packages/style-import/package.json index bf34485fd..18a9e4b8b 100644 --- a/packages/style-import/package.json +++ b/packages/style-import/package.json @@ -4,7 +4,7 @@ "description": "automatic import style by transform code", "type": "module", "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "main": "./esm/index.js", diff --git a/packages/webpack-config/package.json b/packages/webpack-config/package.json index 93fe86e6d..12720b63b 100644 --- a/packages/webpack-config/package.json +++ b/packages/webpack-config/package.json @@ -24,7 +24,7 @@ "webpack": "^5.88.0" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/packages/webpack-modify/package.json b/packages/webpack-modify/package.json index c65c79267..695b195f4 100644 --- a/packages/webpack-modify/package.json +++ b/packages/webpack-modify/package.json @@ -19,7 +19,7 @@ "webpack": "^5.88.0" }, "scripts": { - "watch": "tsc -w", + "watch": "tsc -w --sourceMap", "build": "tsc" }, "publishConfig": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8b836fade..b86fbe03f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1205,6 +1205,7 @@ importers: '@ice/pkg': ^1.5.0 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 + cross-env: ^7.0.3 react: ^18.0.0 react-dom: ^18.0.0 style-unit: ^3.0.4 @@ -1214,6 +1215,7 @@ importers: '@ice/pkg': 1.5.5 '@types/react': 18.0.28 '@types/react-dom': 18.0.11 + cross-env: 7.0.3 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -1330,6 +1332,7 @@ importers: '@types/accept-language-parser': ^1.5.3 '@types/react': ^18.0.33 accept-language-parser: ^1.5.0 + cross-env: ^7.0.3 universal-cookie: ^4.0.4 url-join: ^5.0.0 webpack-dev-server: ^4.13.2 @@ -1346,6 +1349,7 @@ importers: '@remix-run/router': 1.6.1 '@types/accept-language-parser': 1.5.3 '@types/react': 18.0.34 + cross-env: 7.0.3 webpack-dev-server: 4.13.2 packages/plugin-icestark: @@ -1546,6 +1550,7 @@ importers: '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 create-react-class: ^15.7.0 + cross-env: ^7.0.3 react: ^18.0.0 react-dom: ^18.0.0 style-unit: ^3.0.5 @@ -1559,6 +1564,7 @@ importers: '@types/rax': 1.0.10 '@types/react': 18.0.28 '@types/react-dom': 18.0.11 + cross-env: 7.0.3 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -10564,6 +10570,14 @@ packages: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true + /cross-env/7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + dependencies: + cross-spawn: 7.0.3 + dev: true + /cross-fetch/3.1.5: resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} dependencies: diff --git a/tsconfig.base.json b/tsconfig.base.json index 0c38deefd..ddf688d41 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -5,7 +5,6 @@ "jsx": "react", "experimentalDecorators": true, "declaration": true, - "sourceMap": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "moduleResolution": "node",