Skip to content
Snippets Groups Projects
webpack.base.config.js 786 B
Newer Older
Todd Dembrey's avatar
Todd Dembrey committed
var path = require("path")

module.exports = {
    context: __dirname,

Todd Dembrey's avatar
Todd Dembrey committed
    entry: ['./src/index'],
Todd Dembrey's avatar
Todd Dembrey committed

    output: {
        filename: "[name]-[hash].js"
    },

    plugins: [
    ], // add all common plugins here

    module: {
        rules: [
            {
                test: /\.jsx?$/,
                loader: 'babel-loader',
Todd Dembrey's avatar
Todd Dembrey committed
                include: [path.resolve(__dirname, './src')],
Todd Dembrey's avatar
Todd Dembrey committed
                query: {
Todd Dembrey's avatar
Todd Dembrey committed
                    presets: ['@babel/preset-react'],
                    plugins: [
                        'react-hot-loader/babel',
                        '@babel/plugin-proposal-class-properties'
                    ]
Todd Dembrey's avatar
Todd Dembrey committed
                }
            }
        ]
    },

    resolve: {
        modules: ['node_modules'],
        extensions: ['.js', '.jsx']
    },
}