Files
omnivore/pkg/extension-v3/webpack.config.js
Jackson Harper 2ec1d6f58c Initial prototype of the V3 manifest extension (#4357)
* Initial prototype of the V3 manifest extension

* Make sure the content script is only injected once

* Implement addNote button

* More separation work for tasks, implement archive and update note

* Add back missing functionality, add guide to install Extensions

* Revert v2 changes

---------

Co-authored-by: Thomas Rogers <Podginator@gmail.com>
2025-02-23 16:35:41 +01:00

40 lines
929 B
JavaScript

const path = require('path')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
module.exports = {
mode: 'production',
entry: {
background: './src/background.ts',
toolbar: './src/scripts/content/toolbar.ts',
content: './src/scripts/content/content.ts',
},
module: {
rules: [
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.ts', '.js'],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'extension'),
},
plugins: [
new CleanWebpackPlugin(),
new CopyWebpackPlugin({
patterns: [
{ from: 'src/manifest.json', to: 'manifest.json' },
{ from: 'src/icons', to: 'icons' },
{ from: 'src/images', to: 'images' },
{ from: 'src/views', to: 'views' },
],
}),
],
}