Skip to content

Commit 490727e

Browse files
authored
Merge branch 'master' into feat/env-fragment-shaking
2 parents b3f70e4 + 14f8511 commit 490727e

File tree

11 files changed

+29
-7
lines changed

11 files changed

+29
-7
lines changed

packages/jsx-compiler/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
## [0.4.37]
3+
4+
- Fix(bytedance-microapp): componentTag don't support the name start with '_'. Remove the `_` in bytedance.
5+
26

37
## [0.4.36]
48

packages/jsx-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsx-compiler",
3-
"version": "0.4.36",
3+
"version": "0.4.37",
44
"license": "BSD-3-Clause",
55
"description": "Parser for Rax JSX Statements.",
66
"files": [

packages/jsx-compiler/src/adapter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ const parserAdapters = {
112112
// Handle rax-slider and rax-swiper
113113
insertSwiperSlot: true,
114114
needRegisterProps: true,
115+
// ComponentTag don't support that start with '_'.
116+
compTagHeadNoUnderline: true
115117
},
116118
componentCommonProps
117119
};

packages/jsx-compiler/src/modules/components.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ function transformIdentifierComponentName(path, alias, dynamicValue, parsed, opt
3131
renderFunctionPath,
3232
componentDependentProps,
3333
} = parsed;
34+
3435
// Miniapp template tag name does not support special characters.
35-
const aliasName = alias.name.replace(/@|\//g, '_');
36+
let aliasName = alias.name.replace(/@|\//g, '_');
37+
// ByteDance MicroApp's componentTag don't support the name start with '_'.
38+
if (aliasName.indexOf('_') === 0 && options.adapter.compTagHeadNoUnderline) {
39+
aliasName = aliasName.replace('_', '');
40+
}
41+
3642
const componentTag = alias.default ? aliasName : `${aliasName}-${alias.local.toLowerCase()}`;
3743
replaceComponentTagName(path, t.jsxIdentifier(componentTag));
3844
node.isCustomEl = alias.isCustomEl;

packages/miniapp-compile-config/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [0.3.3] - 2022-09-15
4+
5+
- Fix: native routes in `pages/` build error: `needCopyList[i].to error in setEntry()`
6+
37
## [0.3.2] - 2022-01-06
48

59
- Fix: generate duplicate package.json in dev mode

packages/miniapp-compile-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "miniapp-compile-config",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "miniapp compile project config",
55
"author": "Rax Team",
66
"homepage": "https://github.com/raxjs/miniapp#readme",

packages/miniapp-compile-config/src/setEntry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function setEntry(config, routes, options) {
4646
nativeRoutes.forEach(({ source }) => {
4747
needCopyList.push({
4848
from: dirname(join('src', source)),
49-
to: dirname(join('src', source)),
49+
to: dirname(source),
5050
});
5151
});
5252
configEntry(config, normalRoutes, options);

packages/rax-miniapp-runtime-webpack-plugin/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [5.0.4] - 2022-08-30
4+
5+
### Fixed
6+
7+
- *.css.map will be handled as css files if sourceMap is set to 'source-map'
8+
39
## [5.0.3] - 2022-03-02
410

511
### Added

packages/rax-miniapp-runtime-webpack-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rax-miniapp-runtime-webpack-plugin",
3-
"version": "5.0.3",
3+
"version": "5.0.4",
44
"description": "A webpack plugin for miniapp runtime build",
55
"main": "src/index.js",
66
"files": [

packages/rax-miniapp-runtime-webpack-plugin/src/generators/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function generateAppCSS(compilation, { target, pluginDir, subPackages, assets })
5252
let content = `@import "./${defaultCSSFileName}";`;
5353

5454
Object.keys(assets).forEach(asset => {
55-
if (/\.css/.test(asset) && asset !== defaultCSSFileName) {
55+
if (/\.css$/.test(asset) && asset !== defaultCSSFileName) {
5656
if (!subPackages || asset === 'vendors.css') {
5757
const newCssFileName = asset.replace(/\.css/, cssExt);
5858
// In sub packages mode, only vendors.css should be imported in app.css

0 commit comments

Comments
 (0)