ANALYZE=1 yarn webpack --mode=production
Last active
July 19, 2018 12:31
-
-
Save henrikbjorn/dfc50687638f9ebfc9a212675eacaff5 to your computer and use it in GitHub Desktop.
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
Show hidden characters
{ | |
"presets": [ | |
["@babel/preset-env", { | |
"modules": false, | |
"useBuiltIns": "entry", | |
"exclude": [ | |
"transform-regenerator" | |
], | |
"targets": { | |
"ie": "11" | |
} | |
}] | |
], | |
"env": { | |
"test": { | |
"presets": ["env"] | |
} | |
} | |
} |
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
node_modules | |
_build | |
yarn-error.log | |
yarn.lock |
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
import Raven from "raven-js" | |
Raven.setup("asda").install() |
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
{ | |
"name": "", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"repository": "", | |
"author": "", | |
"license": "UNLICENSED", | |
"private": true, | |
"devDependencies": { | |
"@babel/core": "^7.0.0-beta", | |
"@babel/plugin-proposal-class-properties": "^7.0.0-beta.52", | |
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta", | |
"@babel/preset-env": "^7.0.0-beta", | |
"babel-loader": "^8.0.0-beta", | |
"webpack": "^4.14.0", | |
"webpack-bundle-analyzer": "^2.13.1", | |
"webpack-cli": "^3.0.8" | |
}, | |
"dependencies": { | |
"raven-js": "^3.17.0" | |
} | |
} |
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
var webpack = require('webpack') | |
var path = require('path') | |
var NODE_ENV = process.env.NODE_ENV || 'development' | |
var config = { | |
entry: [ | |
path.resolve(__dirname, 'main.js'), | |
], | |
output: { | |
filename: 'bundle.js', | |
chunkFilename: '[name].js', | |
path: path.resolve(__dirname, '_build'), | |
publicPath: '/', | |
}, | |
target: 'web', | |
module: { | |
rules: [ | |
{ test: /\.js?$/, exclude: [/node_modules/], loader: 'babel-loader' }, | |
], | |
}, | |
plugins: [], | |
} | |
if (process.env.ANALYZE) { | |
var AnalyzerPlugin = require('webpack-bundle-analyzer') | |
config.plugins.push(new AnalyzerPlugin.BundleAnalyzerPlugin()) | |
} | |
module.exports = config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment