mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:48:13 +08:00
chore: 优化 svgr 产出代码便于打包
This commit is contained in:
parent
f7373c5abf
commit
82a22d1c8e
@ -133,7 +133,7 @@ function transpileReactCreateElement() {
|
||||
enforce: 'post',
|
||||
transform: (code, id) => {
|
||||
if (
|
||||
/\.(?:t|j)sx/.test(id) &&
|
||||
/\.(?:tsx|jsx|svg)$/.test(id) &&
|
||||
code.indexOf('React.createElement') !== -1
|
||||
) {
|
||||
const separator = '\n\n;';
|
||||
|
@ -153,7 +153,7 @@ function transpileReactCreateElement() {
|
||||
enforce: 'post',
|
||||
transform: (code, id) => {
|
||||
if (
|
||||
/\.(?:t|j)sx/.test(id) &&
|
||||
/\.(?:tsx|jsx|svg)$/.test(id) &&
|
||||
code.indexOf('React.createElement') !== -1
|
||||
) {
|
||||
const separator = '\n\n;';
|
||||
|
@ -121,7 +121,7 @@ function transpileReactCreateElement() {
|
||||
enforce: 'post',
|
||||
transform: (code, id) => {
|
||||
if (
|
||||
/\.(?:t|j)sx/.test(id) &&
|
||||
/\.(?:tsx|jsx|svg)$/.test(id) &&
|
||||
code.indexOf('React.createElement') !== -1
|
||||
) {
|
||||
const separator = '\n\n;';
|
||||
|
Loading…
Reference in New Issue
Block a user