UNPKG

create-mellowtel-extension

Version:

Create a new Mellowtel browser extension with one command

46 lines (44 loc) 1.15 kB
const path = require('path'); const CopyPlugin = require('copy-webpack-plugin'); const Dotenv = require('dotenv-webpack'); module.exports = { mode: 'development', entry: { background: path.join(__dirname, 'src', 'background.js'), content: path.join(__dirname, 'src', 'content.js'), popup: path.join(__dirname, 'src', 'popup.js'), }, output: { path: path.join(__dirname, 'dist'), filename: '[name].js', publicPath: "" }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: ['@babel/preset-env'] } } }, { test: /\.(png|svg|jpg|gif)$/, use: [ 'file-loader', ], }, ] }, plugins: [ new Dotenv(), new CopyPlugin({ patterns: [ { from: 'public', to: '' } ], }), ] };