Last active
April 28, 2020 10:39
-
-
Save drcmda/bee382181b5189bcd3a6831e448980d8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ | |
"name": "project", | |
"version": "0.0.1", | |
"description": "...", | |
"module": "dist/index.js", | |
"sideEffects": false, | |
"scripts": { | |
"build": "rollup -c", | |
"prepare": "npm run build", | |
"test": "echo no tests yet", | |
}, | |
"husky": { | |
"hooks": { | |
"pre-commit": "pretty-quick --staged" | |
} | |
}, | |
"prettier": { | |
"semi": false, | |
"trailingComma": "es5", | |
"singleQuote": true, | |
"jsxBracketSameLine": true, | |
"tabWidth": 2, | |
"printWidth": 120 | |
}, | |
"repository": { | |
"type": "git", | |
"url": "git+https://github.com/userName/project.git" | |
}, | |
"author": "...", | |
"license": "MIT", | |
"bugs": { | |
"url": "https://github.com/userName/project/issues" | |
}, | |
"homepage": "https://github.com/userName/project#readme", | |
"devDependencies": { | |
"@babel/core": "7.9.0", | |
"@babel/preset-env": "7.9.5", | |
"@babel/preset-react": "7.9.4", | |
"husky": "^4.2.5", | |
"prettier": "^2.0.5", | |
"pretty-quick": "^2.0.1", | |
"react": "^16.13.1", | |
"react-dom": "^16.13.1", | |
"rollup-plugin-babel": "^4.4.0", | |
"rollup-plugin-node-resolve": "^5.2.0" | |
} | |
} |
This file contains hidden or 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
import babel from 'rollup-plugin-babel' | |
import resolve from 'rollup-plugin-node-resolve' | |
export default { | |
input: `./src/index.js`, | |
output: { file: `dist/index.js`, format: 'esm' }, | |
plugins: [ | |
babel({ | |
babelrc: false, | |
exclude: '**/node_modules/**', | |
runtimeHelpers: true, | |
presets: [ | |
['@babel/preset-env', { loose: true, modules: false, targets: '>1%, not dead, not ie 11, not op_mini all' }], | |
'@babel/preset-react', | |
], | |
plugins: [['@babel/transform-runtime', { regenerator: false, useESModules: true }]], | |
}), | |
resolve(), | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment