apply-with-linkedin-react
Version:
React Component for Apply With LinkedIn
56 lines (53 loc) • 1.16 kB
JavaScript
const path = require('path');
module.exports = {
mode: 'production',
entry: './src/index.js',
output: {
path: path.join(__dirname, './dist'),
filename: 'ApplyWithLinkedIn.js',
libraryTarget: 'umd',
library: 'ApplyWithLinkedIn',
umdNamedDefine: true
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react']
}
}
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
},
{
test: /\.(png|svg|jpg|gif)$/,
use: [
'file-loader'
]
}
]
},
resolve: {
alias: {
'react': path.resolve(__dirname, './node_modules/react'),
}
},
externals: {
// Don't bundle react or react-dom
react: {
commonjs: "react",
commonjs2: "react",
amd: "React",
root: "React"
},
}
};