1 const path = require('path');
6 // Enable sourcemaps for debugging webpack's output.
10 // Add '.ts' and '.tsx' as resolvable extensions.
11 extensions: [".ts", ".tsx"]
14 entry: "./src/app.tsx",
17 // options related to how webpack emits results
18 path: path.resolve(__dirname, "dist"), // string
19 // the target directory for all output files
20 // must be an absolute path (use the Node.js path module)
21 filename: "react-render.js", // string
28 exclude: /node_modules/,
35 // All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
39 loader: "source-map-loader"
44 // When importing a module whose path matches one of the following, just
45 // assume a corresponding global variable exists and use that instead.
46 // This is important because it allows us to avoid bundling all of our
47 // dependencies, which allows browsers to cache those libraries between builds.
50 "react-dom": "ReactDOM"