This repository has been archived on 2024-11-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
mattermost-plugin-attachmen.../webapp/webpack.config.js
Michael Kochell adf353748e
Add corejs: 3, and pull out babel config from webpack config (#84)
* add `corejs: 3` and pull out babel config from webpack config

* typo
2020-02-06 07:09:11 -05:00

42 lines
1,019 B
JavaScript

var path = require('path');
module.exports = {
entry: [
'./src/index.js',
],
resolve: {
modules: [
'src',
'node_modules',
],
extensions: ['*', '.js', '.jsx', '.ts', '.tsx'],
},
module: {
rules: [
{
test: /\.(js|jsx|ts|tsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
cacheDirectory: true,
// Babel configuration is in babel.config.js because jest requires it to be there.
},
},
},
],
},
externals: {
react: 'React',
redux: 'Redux',
'react-redux': 'ReactRedux',
'prop-types': 'PropTypes',
'react-bootstrap': 'ReactBootstrap',
},
output: {
path: path.join(__dirname, '/dist'),
publicPath: '/',
filename: 'main.js',
},
};