Skip to content

Instantly share code, notes, and snippets.

@agzuniverse
Created October 1, 2019 16:48
Show Gist options
  • Select an option

  • Save agzuniverse/d6eb344a03d17cfd9cfeef216b3caa65 to your computer and use it in GitHub Desktop.

Select an option

Save agzuniverse/d6eb344a03d17cfd9cfeef216b3caa65 to your computer and use it in GitHub Desktop.

Revisions

  1. agzuniverse created this gist Oct 1, 2019.
    29 changes: 29 additions & 0 deletions webpack-babel-react-2.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    const path = require('path')

    module.exports = {
    "entry": "./src/index.js",
    "output": {
    path: path.resolve(__dirname, 'dist'),
    filename: "bundle.js"
    },
    module: {
    rules: [
    {
    test: /\.(js|jsx)$/,
    exclude: /node_modules/,
    use: "babel-loader"
    },
    {
    test: /\css$/,
    use: [
    {
    loader: "style-loader"
    },
    {
    loader: "css-loader"
    }
    ]
    }
    ]
    }
    }