use-dark-hook
Version:
A light-weight and straight forward library that adds 'dark mode' in your web app using React Hook.
29 lines (27 loc) • 559 B
JavaScript
var path = require('path');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'build'),
filename: 'use-dark-hook.js',
libraryTarget: 'commonjs2',
},
module: {
rules: [
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
exclude: /(node_modules|build)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
],
},
externals: {
react: 'commonjs react',
},
};