diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..8206ec6 --- /dev/null +++ b/src/index.html @@ -0,0 +1,11 @@ + + + + + Pluralsight Redux + + + +
+ + diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..c908e6e --- /dev/null +++ b/src/index.js @@ -0,0 +1,8 @@ +import React from "react"; +import { render } from "react-dom"; + +function Hi() { + return

Hi.

; +} + +render(, document.getElementById("app")); diff --git a/webpack.config.dev.js b/webpack.config.dev.js new file mode 100644 index 0000000..1742d7b --- /dev/null +++ b/webpack.config.dev.js @@ -0,0 +1,44 @@ +const webpack = require("webpack"); +const path = require("path"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); + +process.env.NODE_ENV = "developent"; + +module.exports = { + node: "development", + target: "web", + devTools: "cheap-module-source-map", + entry: "./src/index", + output: { + path: path.resolve(__dirname, "build"), + publicPath: "/", + filename: "bundle.js", + }, + devServer: { + stats: "minimal", + overlay: true, + historyApiFallback: true, + disableHostCheck: true, + headers: { "Access-Control-Allow-Origin": "*" }, + https: false, + }, + plugins: [ + new HtmlWebpackPlugin({ + template: "src/index.html", + favicon: "src/favicon.ico", + }), + ], + module: { + rules: [ + { + test: /\.(js|jsx)$/, + exclude: /node_modules/, + use: ["babel-loader"], + }, + { + test: /(\.css)$/, + use: ["style-loader", "css-loader"], + }, + ], + }, +};