-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vinicius Dallacqua
committed
Mar 13, 2018
1 parent
4f2a83c
commit 8fe9708
Showing
4 changed files
with
1,555 additions
and
229 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"react-error-guard": { | ||
"configuration": { | ||
"config": { | ||
"webpackOptions": { | ||
"module": { | ||
"rules": [ | ||
{ | ||
"test": {}, | ||
"exclude": "/node_modules/", | ||
"loader": "'babel-loader'", | ||
"options": { | ||
"presets": [ | ||
"'env'" | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"plugins": [ | ||
"new UglifyJSPlugin()" | ||
], | ||
"entry": "\"./src/index\"", | ||
"output": { | ||
"filename": "'[name].bundle.js'", | ||
"path": "path.resolve(__dirname, 'lib/')" | ||
} | ||
}, | ||
"topScope": [ | ||
"const webpack = require('webpack')", | ||
"const path = require('path')", | ||
"/*\n * We've enabled UglifyJSPlugin for you! This minifies your app\n * in order to load faster and run less javascript.\n *\n * https://github.com/webpack-contrib/uglifyjs-webpack-plugin\n *\n */", | ||
"const UglifyJSPlugin = require('uglifyjs-webpack-plugin');", | ||
"\n" | ||
], | ||
"configName": "config" | ||
} | ||
} | ||
} | ||
} |
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,55 @@ | ||
const webpack = require('webpack'); | ||
const path = require('path'); | ||
|
||
/* | ||
* We've enabled UglifyJSPlugin for you! This minifies your app | ||
* in order to load faster and run less javascript. | ||
* | ||
* https://github.com/webpack-contrib/uglifyjs-webpack-plugin | ||
* | ||
*/ | ||
|
||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: './src/index', | ||
|
||
output: { | ||
library: 'react-error-guard', | ||
libraryTarget: 'umd', | ||
path: path.resolve(__dirname, 'lib/'), | ||
}, | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js?$/, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader', | ||
|
||
options: { | ||
presets: ['env'], | ||
}, | ||
}, | ||
], | ||
}, | ||
|
||
externals: { | ||
react: { | ||
root: 'React', | ||
commonjs2: 'react', | ||
commonjs: 'react', | ||
amd: 'react', | ||
umd: 'react', | ||
}, | ||
'react-dom': { | ||
root: 'ReactDOM', | ||
commonjs2: 'react-dom', | ||
commonjs: 'react-dom', | ||
amd: 'react-dom', | ||
umd: 'react-dom', | ||
}, | ||
}, | ||
|
||
plugins: [new UglifyJSPlugin()], | ||
}; |
Oops, something went wrong.