// Webpack config to serve the JSX component with bundled styles

import path from 'path';

const demoPath = path.join(__dirname, './demo');
const sourcePath = path.join(__dirname, './src');

export default {
  entry: {
    js: [demoPath.concat('/render.js')],
  },
  output: {
    path: demoPath,
    filename: 'bundle.js',
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        loaders: [
          'style-loader',
          {
            loader: 'css-loader',
            query: {
              modules: true,
            },
          },
        ],
      },
    ],
  },
  resolve: {
    extensions: ['.js', '.jsx'],
    modules: [
      path.resolve(__dirname, 'node_modules'),
      sourcePath,
    ],
  },
};

// Webpack config to serve the JSX component with bundled styles

import path from 'path';

const demoPath = path.join(__dirname, './demo');
const jsxPath = path.join(__dirname, './jsx');

export default {
  entry: {
    js: [demoPath.concat('/render.js')],
  },
  output: {
    path: demoPath,
    filename: 'bundle.js',
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        loaders: [
          'style-loader',
          {
            loader: 'css-loader',
            query: {
              modules: true,
            },
          },
        ],
      },
    ],
  },
  resolve: {
    extensions: ['.js', '.jsx'],
    modules: [
      path.resolve(__dirname, 'node_modules'),
      jsxPath,
    ],
  },
};

--- 
+++ 
@@ -3,7 +3,7 @@
 import path from 'path';
 
 const demoPath = path.join(__dirname, './demo');
-const jsxPath = path.join(__dirname, './jsx');
+const sourcePath = path.join(__dirname, './src');
 
 export default {
   entry: {
@@ -33,7 +33,7 @@
     extensions: ['.js', '.jsx'],
     modules: [
       path.resolve(__dirname, 'node_modules'),
-      jsxPath,
+      sourcePath,
     ],
   },
 };
Switch from JSX to render functions
