File tree Expand file tree Collapse file tree 3 files changed +27
-17
lines changed
Expand file tree Collapse file tree 3 files changed +27
-17
lines changed Original file line number Diff line number Diff line change 11import { defineConfig } from 'father' ;
22
3- const config = {
3+
4+
5+
6+ const config = defineConfig ( {
47 // Locked version only supports 1.0.0
58 plugins : [ '@rc-component/father-plugin' ] ,
6- } ;
9+ esm : {
10+ transformer : 'swc' ,
11+ } ,
12+ cjs : {
13+ transformer : 'swc' ,
14+ }
15+ } ) ;
716
817if ( process . env . NODE_ENV !== 'ci' ) {
918 config . umd = {
@@ -33,4 +42,4 @@ if (process.env.NODE_ENV !== 'ci') {
3342 } ;
3443}
3544
36- export default defineConfig ( config ) ;
45+ export default config ;
Original file line number Diff line number Diff line change 7070 "rimraf" : " ^3.0.0" ,
7171 "styled-components" : " ^3.3.3" ,
7272 "ts-node" : " ^8.0.0" ,
73- "typescript" : " ^4.0.2"
73+ "typescript" : " ^4.0.2" ,
74+ "@swc/core" : " ^1.3.53"
7475 },
7576 "peerDependencies" : {
7677 "react" : " >=16.0.0" ,
8485 "registry" : " https://registry.npmjs.org"
8586 },
8687 "gitHead" : " 225d4d2189720ee3b7e4a4d7a6d80e076fa15cbc"
87- }
88+ }
Original file line number Diff line number Diff line change @@ -82,18 +82,18 @@ ${entryText}
8282async function generateEntries ( ) {
8383 const render = template ( `
8484'use strict';
85- Object.defineProperty(exports, "__esModule", {
86- value: true
87- });
88- exports.default = void 0;
89-
90- var _<%= svgIdentifier %> = _interopRequireDefault(require('./lib/icons/<%= svgIdentifier %>'));
91-
92- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
93-
94- var _default = _<%= svgIdentifier %>;
95- exports.default = _default;
96- module.exports = _default;
85+ Object.defineProperty(exports, "__esModule", {
86+ value: true
87+ });
88+ exports.default = void 0;
89+
90+ const _<%= svgIdentifier %> = _interopRequireDefault(require('./lib/icons/<%= svgIdentifier %>'));
91+
92+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
93+
94+ const _default = _<%= svgIdentifier %>;
95+ exports.default = _default;
96+ module.exports = _default;
9797` . trim ( ) ) ;
9898
9999 await walk ( async ( { svgIdentifier } ) => {
You can’t perform that action at this time.
0 commit comments