UNPKG

react-seasonal-background

Version:
47 lines (46 loc) 1.08 kB
const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const htmlWebpackPlugin = new HtmlWebpackPlugin({ template: path.join(__dirname, "./example/index.html"), filename: "./index.html" }); module.exports = { entry: path.join(__dirname, "./example/app.js"), output: { path: path.join(__dirname, "example/dist"), filename: "bundle.js" }, module: { rules: [ { test: /\.css$/, use: [{ loader: "style-loader" }, { loader: "css-loader" }] }, { test: [/\.jsx$/, /\.js$/], exclude: /node_modules/, use: "babel-loader" }, { test: /\.(eot|svg|ttf|woff|woff2)$/, use: "url-loader?name=[name].[ext]" }, { test: /\.(svg|png|jpe?g|gif)$/, use: [ { loader: "file-loader", options: {} } ] } ] }, plugins: [htmlWebpackPlugin], resolve: { extensions: [".js", ".jsx"] }, devServer: { port: 3001 } };