We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following is my rollup configuration file
const defaults = {compilerOptions: {module: 'commonjs'}, exclude: ['node_modules', 'dist']}; const override = { compilerOptions: {module: 'es2015'}, exclude: ['node_modules', 'dist', 'scripts', 'examples', 'gulpfile.ts', 'common'] }; let rollupConfigs: RollupOptions = { input: utils.pathResolve(`components/${componentName}/index.tsx`), output: { file: utils.pathResolve(`dist/${componentName}/index.js`), format: 'cjs' }, external: [ 'react', 'react-dom', 'better-scroll', 'classnames', 'rc-animate', 'shallowequal' ], plugins: [ external(), svgr(), nodeResovle({extensions: ['.js', '.ts', '.tsx', '.svg']}), commonjs({ include: ['node_modules/**'], namedExports: { 'node_modules/react/index.js': [ 'Component', 'PureComponent', 'Fragment', 'Children', 'createElement', 'createRef', 'cloneElement' ], 'node_modules/react-dom/index.js': ['render', 'createPortal'] } }), typescript({ verbosity: -1, tsconfigDefaults: defaults, tsconfig: 'tsconfig.json', tsconfigOverride: override, objectHashIgnoreUnknownHack: true, rollupCommonJSResolveHack: true, typescript: require('typescript') }) ] };
The following is my tsconfig file
{ "compilerOptions": { "baseUrl": "./", "target": "es5", "module": "commonjs", "composite": true, "declaration": true, "removeComments": true, "downlevelIteration": true, "noImplicitThis": true, "paths": { "@baidu/duui/*": ["./components/*/index.tsx"], "duui": ["components/index.tsx"] }, "strictNullChecks": true, "moduleResolution": "node", "esModuleInterop": true, "experimentalDecorators": true, "jsx": "react", "noUnusedParameters": true, "noUnusedLocals": true, "importHelpers": true, "allowSyntheticDefaultImports": true, "lib": ["es2015", "es2016", "es2017", "dom"] }, "exclude": ["node_modules", "dist", "scripts"] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
💬 Could not resolve '../../icons/toast/success.svg' by use @svgr/rollup and rollup-plugin-typescript2
The following is my rollup configuration file
The following is my tsconfig file
The text was updated successfully, but these errors were encountered: