Created
January 28, 2019 16:13
-
-
Save PullJosh/2dc16325f57106f2b4fce0f67e97858b to your computer and use it in GitHub Desktop.
Exporting Component with Hooks: Package Settings
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
Show hidden characters
{ | |
"presets": [ | |
["@babel/react"], | |
["@babel/env", { "useBuiltIns": "usage" }] | |
] | |
} |
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": "atlas-editor", | |
"version": "1.0.0", | |
"description": "React-based code editor for the web", | |
"main": "build/editor.js", | |
"author": "Josh Pullen", | |
"license": "MIT", | |
"scripts": { | |
"prepublish": "rm -rf ./build && npm run build", | |
"build": "webpack" | |
}, | |
"peerDependencies": { | |
"react": "^16.8.0-alpha.1", | |
"react-dom": "^16.8.0-alpha.1" | |
}, | |
"devDependencies": { | |
"@babel/core": "^7.2.2", | |
"@babel/preset-env": "^7.3.1", | |
"@babel/preset-react": "^7.0.0", | |
"babel-loader": "^8.0.5", | |
"webpack": "^4.29.0", | |
"webpack-cli": "^3.2.1" | |
}, | |
"dependencies": { | |
"@babel/polyfill": "^7.2.5", | |
"classnames": "^2.2.6", | |
"clipboard-polyfill": "^2.7.0", | |
"memoize-one": "^5.0.0", | |
"moo": "^0.5.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
var path = require('path') | |
module.exports = { | |
mode: 'production', | |
entry: './src/index.js', | |
output: { | |
path: path.resolve('build'), | |
filename: 'editor.js', | |
libraryTarget: 'commonjs2' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /(node_modules)/, | |
use: 'babel-loader' | |
} | |
] | |
}, | |
externals: { | |
'react': 'react', | |
'react-dom': 'react-dom' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment