@kiwicom/smart-faq
Version:
40 lines (36 loc) • 771 B
JavaScript
/* eslint-disable import/no-extraneous-dependencies */
// @noflow
const path = require('path');
const Dotenv = require('dotenv-webpack');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const language = process.env.LANGUAGE || 'en';
const destination = path.join(__dirname, 'dist');
module.exports = {
name: language,
devtool: 'source-map',
output: {
path: destination,
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
],
},
plugins: [
new Dotenv({
systemvars: true,
}),
new UglifyJsPlugin({
sourceMap: true,
}),
],
externals: {
react: 'React',
'react-dom': 'ReactDOM',
'styled-components': 'styled',
},
};