Two projects, one is created by CSA which works, another created by CRA but comes the error, both of them add @ant-design/pro-layout #2590
Unanswered
wlc534
asked this question in
Troubleshooting
Replies: 1 comment
-
I have the same issue, have you ever found a solution? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey @FredKSchott,Two projects, one is created by CSA which works, another created by CRA but comes the error, both of them add @ant-design/pro-layout
plugins: ['@snowpack/plugin-react-refresh', '@snowpack/plugin-dotenv','snowpack-plugin-less'],
[snowpack] ! building dependencies...

[snowpack] Failed to load node_modules/@ant-design/pro-layout/es/Header.less
Unexpected character '@' (Note that you need plugins to import files that are not JavaScript)
snowpack
node_modules/@ant-design/pro-layout/es/BasicLayout.less
@import '~antd/es/style/themes/default.less';
@basicLayout-prefix-cls: ~'@{ant-prefix}-pro-basicLayout';
@pro-layout-header-height: 48px;
.@{basicLayout-prefix-cls} {
// BFC
display: flex;
flex-direction: column;
width: 100%;
min-height: 100%;
.@{ant-prefix}-layout-header {
&.@{ant-prefix}-pro-fixed-header {
position: fixed;
top: 0;
}
}
&-content {
position: relative;
margin: 24px;
}
// children should support fixed
.@{basicLayout-prefix-cls}-is-children.@{basicLayout-prefix-cls}-fix-siderbar {
height: 100vh;
overflow: hidden;
transform: rotate(0);
}
.@{basicLayout-prefix-cls}-has-header {
// tech-page-container
.tech-page-container {
height: calc(100vh - @pro-layout-header-height);
}
.@{basicLayout-prefix-cls}-is-children.@{basicLayout-prefix-cls}-has-header {
.tech-page-container {
height: calc(100vh - @pro-layout-header-height - @pro-layout-header-height;);
}
.@{basicLayout-prefix-cls}-is-children {
min-height: calc(100vh - @pro-layout-header-height);
&.@{basicLayout-prefix-cls}-fix-siderbar {
height: calc(100vh - @pro-layout-header-height);
}
}
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions