Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react): move from taskr to rollup
- Loading branch information
Showing
5 changed files
with
2,409 additions
and
3,294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import babel from '@rollup/plugin-babel'; | ||
var recursive = require('recursive-readdir'); | ||
|
||
async function getFiles() { | ||
const files = await recursive('src'); | ||
|
||
return files; | ||
} | ||
const external = [ | ||
'@babel/runtime/helpers/assertThisInitialized', | ||
'@babel/runtime/helpers/classCallCheck', | ||
'@babel/runtime/helpers/createClass', | ||
'@babel/runtime/helpers/defineProperty', | ||
'@babel/runtime/helpers/extends', | ||
'@babel/runtime/helpers/getPrototypeOf', | ||
'@babel/runtime/helpers/inherits', | ||
'@babel/runtime/helpers/objectWithoutProperties', | ||
'@babel/runtime/helpers/possibleConstructorReturn', | ||
'@babel/runtime/regenerator', | ||
'@babel/runtime/helpers/asyncToGenerator', | ||
'axios', | ||
'core-js', | ||
'react', | ||
'next/router', | ||
'prop-types', | ||
'shallowequal', | ||
'validator', | ||
]; | ||
|
||
export default getFiles().then((files) => | ||
files.map((name, index) => ({ | ||
external, | ||
input: name, | ||
output: { | ||
dir: name.startsWith('src/forms') ? 'dist/lib/forms' : 'dist/lib', | ||
exports: 'named', | ||
format: 'cjs', | ||
name, | ||
}, | ||
plugins: [ | ||
babel({ babelHelpers: 'runtime', presets: ['@babel/preset-react'] }), | ||
], | ||
})) | ||
); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.