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 http = require("https"); | |
var options = { | |
"method": "POST", | |
"hostname": "https://owneymail.com", | |
"port": null, | |
"path": "/api/v1/owney/go", | |
"headers": { | |
"authorization": "Bearer <<YOUR_API_KEY>>", | |
"content-type": "application/json" |
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
// ... | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
// ... | |
const config = { | |
// ... | |
plugins: [ | |
// ... | |
new CopyWebpackPlugin([ |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const StyleExtHtmlWebpackPlugin = require('style-ext-html-webpack-plugin'); | |
const WebpackZipPlugin = require('webpack-zip-plugin'); | |
const isDevelopment = process.env.NODE_ENV === 'development'; | |
let plugins = []; |
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
const WebpackZipPlugin = require('webpack-zip-plugin'); | |
if (isDevelopment === false) { | |
plugins = plugins.concat([ | |
// ... | |
new WebpackZipPlugin({ | |
initialFile: 'build', | |
endPath: './', | |
zipName: 'build.zip', | |
}), |
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
// ... | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const StyleExtHtmlWebpackPlugin = require('style-ext-html-webpack-plugin'); | |
// ... | |
const config = { | |
// ... | |
plugins: [ | |
new StyleExtHtmlWebpackPlugin({ | |
minify: isDevelopment === false, |
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
// ... | |
if (isDevelopment === false) { | |
plugins = plugins.concat([ | |
new webpack.optimize.UglifyJsPlugin({ | |
compress: { | |
warnings: false, | |
screw_ie8: true, | |
conditionals: true, | |
unused: true, |
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
// .. | |
const config = { | |
// ... | |
plugins: [ | |
new HtmlWebpackPlugin({ | |
template: 'src/index.html', | |
minify: { | |
collapseWhitespace: isDevelopment === false, | |
collapseInlineTagWhitespace: isDevelopment === false, | |
removeComments: isDevelopment === false, |
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
//... | |
imageLoaders = imageLoaders.concat([ | |
{ | |
loader: 'image-webpack-loader', | |
options: { | |
bypassOnDebug: true, | |
}, | |
}, | |
{ |
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
let imageLoaders = [ | |
{ | |
loader: 'url-loader', | |
options: { | |
limit: 5000000, | |
}, | |
}, | |
]; | |
const config = { |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const isDevelopment = process.env.NODE_ENV === 'development'; | |
let plugins = []; | |
const config = { | |
entry: { |
NewerOlder