Skip to content
Snippets Groups Projects
webpack.base.config.js 1.07 KiB
Newer Older
  • Learn to ignore specific revisions
  • Todd Dembrey's avatar
    Todd Dembrey committed
    
    module.exports = {
        context: __dirname,
    
    
    Todd Dembrey's avatar
    Todd Dembrey committed
        entry: ['./src/index'],
    
    Todd Dembrey's avatar
    Todd Dembrey committed
    
        output: {
    
    Todd Dembrey's avatar
    Todd Dembrey committed
        },
    
        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
                    }
    
                },
                {
                    test: /\.scss$/,
                    use: [
                        'style-loader',
                        'css-loader',
                        'sass-loader'
                    ]
    
                },
                {
                    test: /\.svg$/,
                    use: ['@svgr/webpack']
    
    Todd Dembrey's avatar
    Todd Dembrey committed
                }
            ]
        },
    
        resolve: {
            modules: ['node_modules'],
            extensions: ['.js', '.jsx']