mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-27 12:50:51 +03:00
Added manifest building.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
const webpack = require("webpack");
|
||||
const path = require('path');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const BuildManifest = require('./webpack.manifest');
|
||||
const srcDir = '../src/';
|
||||
|
||||
module.exports = {
|
||||
module.exports = env => ({
|
||||
entry: {
|
||||
popup: path.join(__dirname, srcDir + 'popup.ts'),
|
||||
background: path.join(__dirname, srcDir + 'background.ts'),
|
||||
@@ -34,11 +35,14 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
// exclude locale files in moment
|
||||
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||
new CopyPlugin([
|
||||
{ from: '.', to: '../' }
|
||||
{ from: '.', to: '../', ignore: ['manifest.json'] }
|
||||
],
|
||||
{context: 'public' }
|
||||
),
|
||||
new BuildManifest({
|
||||
browser: env.browser,
|
||||
pretty: env.mode === "production"
|
||||
})
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user