Skip to content
Permalink
Browse files

Fixed building of slides so that it can be deployed properly.

  • Loading branch information
nickytonline committed Dec 23, 2017
1 parent 31062b7 commit ba8a32555b4293852a5a75c15ad8f79180cf724b
Showing with 24 additions and 14 deletions.
  1. +3 −1 index.html
  2. +2 −3 package.json
  3. +10 −6 webpack.config.js
  4. +9 −4 webpack.config.production.js
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width initial-scale=1 user-scalable=no" />
@@ -8,10 +9,11 @@
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/prism/1.3.0/themes/prism-tomorrow.css">
</head>

<body>
<div id="root"></div>
<script src="https://cdn.jsdelivr.net/prism/1.3.0/prism.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/prism/1.3.0/components/prism-jsx.min.js" type="text/javascript"></script>
<script src="./dist/bundle.js"></script>
</body>

</html>
@@ -4,11 +4,9 @@
"description": "JS Montreal - An Introduction to React Storybook, June 13th, 2017",
"main": "lib/index.js",
"scripts": {
"clean": "rimraf dist",
"build": "cross-env NODE_ENV=production webpack --config webpack.config.production.js",
"lint": "eslint --ext .js,.jsx .",
"deploy": "npm run clean & npm run build && surge -p .",
"start": "cross-env y bNODE_ENV=development node server.js",
"start": "cross-env NODE_ENV=development node server.js",
"workbench": "start-storybook -p 9001",
"workbench:build": "build-storybook -c .storybook -o .workbench"
},
@@ -44,6 +42,7 @@
"express": "4.13.3",
"file-loader": "0.8.4",
"html-loader": "0.4.0",
"html-webpack-plugin": "2.30.1",
"is-buffer": "1.1.1",
"markdown-loader": "0.1.7",
"node-libs-browser": "0.5.3",
@@ -1,17 +1,21 @@
/* eslint-disable */

var path = require("path");
var webpack = require("webpack");
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");

module.exports = {
devtool: "source-map",
entry: ["webpack-hot-middleware/client", "babel-polyfill", "./index"],
output: {
path: path.join(__dirname, "dist"),
filename: "bundle.js",
publicPath: "/dist/"
filename: "bundle.js"
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html',
hash: true,
filename: 'index.html',
inject: 'body'
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
@@ -1,16 +1,21 @@
/* eslint-disable */

var path = require("path");
var webpack = require("webpack");
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");

module.exports = {
entry: ["babel-polyfill", "./index"],
output: {
path: path.join(__dirname, "dist"),
filename: "bundle.js",
publicPath: "/dist/"
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html',
hash: true,
filename: 'index.html',
inject: 'body'
}),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
"process.env": {

0 comments on commit ba8a325

Please sign in to comment.
You can’t perform that action at this time.