Permalink
Browse files

production lazy bundles configured to pull from cdn

  • Loading branch information...
joelewis committed Dec 22, 2018
1 parent 4361623 commit 67ffb4f0d79b4426c1087593a03282afd3579974
BIN +0 Bytes (100%) .DS_Store
Binary file not shown.
@@ -47,4 +47,6 @@ coverage/
shippable/

# not include scripts because they come from external module
scripts/
scripts/

staticupload.sh
BIN +0 Bytes (100%) client/.DS_Store
Binary file not shown.
BIN +0 Bytes (100%) client/public/.DS_Store
Binary file not shown.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -2,6 +2,8 @@ const path = require("path");
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");

const STATIC_HOST = '';

module.exports = {
entry: "./src/index.js",
mode: "development",
@@ -50,7 +52,7 @@ module.exports = {
resolve: { extensions: ["*", ".js", ".jsx", ".less"] },
output: {
path: path.resolve(__dirname, "public/js/"),
publicPath: "/writango/static/js/",
publicPath: STATIC_HOST + "/writango/static/js/",
filename: "bundle.js"
},
devServer: {
@@ -66,7 +68,7 @@ module.exports = {
path: path.resolve(__dirname, "public/css/"),
filename: "[name].css",
// chunkFilename: "[id].css",
publicPath: "/writango/static/css/",
publicPath: STATIC_HOST + "/writango/static/css/",
})
]
};
@@ -3,6 +3,8 @@ const webpack = require("webpack");
const MinifyPlugin = require("babel-minify-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");

const STATIC_HOST = 'https://hexopress.sgp1.cdn.digitaloceanspaces.com';

module.exports = {
entry: "./src/index.js",
mode: "production",
@@ -51,7 +53,7 @@ module.exports = {
resolve: { extensions: ["*", ".js", ".jsx", ".less"] },
output: {
path: path.resolve(__dirname, "public/js/"),
publicPath: "/writango/static/js/",
publicPath: STATIC_HOST + "/writango/static/js/",
filename: "bundle.js"
},
plugins: [
@@ -61,7 +63,7 @@ module.exports = {
// both options are optional
filename: "[name].css",
// chunkFilename: "[id].css",
publicPath: "/writango/static/css/",
publicPath: STATIC_HOST + "/writango/static/css/",
})
]
};

0 comments on commit 67ffb4f

Please sign in to comment.