UNPKG

react-whitelabel

Version:

A React context and components that make run-time white-labeling of a React app easy.

52 lines (49 loc) 1.65 kB
// Copyright 2020 Thomas Hintz // // This file is part of the react-whitelabel project. // // The react-whitelabel project is free software: you can // redistribute it and/or modify it under the terms of the GNU General // Public License as published by the Free Software Foundation, either // version 3 of the License, or (at your option) any later version OR // under the terms of the MIT license. // // The react-whitelabel project is distributed in the hope that // it will be useful, but WITHOUT ANY WARRANTY; without even the // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. // // You should have received a copy of the GNU General Public License // and MIT License along with the react-whitelabel project. If not, // see <https://www.gnu.org/licenses/> and // <https://opensource.org/licenses/MIT>. const path = require('path'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); module.exports = { entry: { app: './index.js', }, output: { filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist'), libraryTarget: 'commonjs2' }, plugins: [ new CleanWebpackPlugin(), ], module: { rules: [ { test: /\.m?(js|jsx)$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { presets: [['@babel/preset-env', { modules: false }], "@babel/preset-react",], } } }, ], }, };