mirror of
https://github.com/SrIzan10/return-youtube-dislike.git
synced 2026-05-01 10:55:27 +00:00
Webpack fixes
This commit is contained in:
4622
package-lock.json
generated
4622
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -5,8 +5,8 @@
|
||||
"main": "ryd.content-script.js",
|
||||
"scripts": {
|
||||
"start": "echo To build for development, please use \"npm run dev\". To build for production, please use \"npm run build\".",
|
||||
"dev": "webpack --mode=development \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined/dist/\" --watch",
|
||||
"build": "webpack --mode=production \"./Extensions/combined/ryd.content-script.js\" -o \"./Extensions/combined\"",
|
||||
"dev": "webpack --mode=production --watch",
|
||||
"build": "webpack --mode=production",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
@@ -30,6 +30,7 @@
|
||||
"@babel/runtime": "^7.16.5",
|
||||
"babel-loader": "^8.2.3",
|
||||
"copy-webpack-plugin": "^10.2.0",
|
||||
"filemanager-webpack-plugin": "^6.1.7",
|
||||
"webpack-cli": "^4.9.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,57 +1,67 @@
|
||||
const path = require('path');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const path = require("path");
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const FileManagerPlugin = require("filemanager-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
entry: path.join(__dirname, './Extensions/combined/ryd.content-script.js'),
|
||||
entry: path.join(__dirname, "./Extensions/combined/ryd.content-script.js"),
|
||||
output: {
|
||||
filename: 'bundled-content-script.js',
|
||||
path: path.resolve(__dirname, 'Extensions/combined')
|
||||
filename: "bundled-content-script.js",
|
||||
path: path.resolve(__dirname, "Extensions/combined/dist"),
|
||||
clean: true,
|
||||
},
|
||||
optimization: {
|
||||
minimize: false
|
||||
minimize: false,
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.m?js$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['@babel/preset-env'],
|
||||
plugins: ['@babel/plugin-proposal-object-rest-spread']
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
watchOptions: {
|
||||
ignored: "./Extensions/combined/dist/*"
|
||||
},
|
||||
plugins: [
|
||||
// exclude locale files in moment
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: './Extensions/combined',
|
||||
to: './dist/chrome',
|
||||
from: "./Extensions/combined",
|
||||
to: "./chrome",
|
||||
globOptions: {
|
||||
ignore: ['**/manifest-**', '**/dist/**', '**/src/**','**/ryd.content-script.js']
|
||||
}
|
||||
ignore: [
|
||||
"**/manifest-**",
|
||||
"**/dist/**",
|
||||
"**/src/**",
|
||||
"**/ryd.content-script.js",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
from: './Extensions/combined/manifest-chrome.json',
|
||||
to: './dist/chrome/manifest.json'
|
||||
from: "./Extensions/combined/manifest-chrome.json",
|
||||
to: "./chrome/manifest.json",
|
||||
},
|
||||
{
|
||||
from: './Extensions/combined',
|
||||
to: './dist/firefox',
|
||||
from: "./Extensions/combined",
|
||||
to: "./firefox",
|
||||
globOptions: {
|
||||
ignore: ['**/manifest-**', '**/dist/**', '**/src/**','**/ryd.content-script.js']
|
||||
}
|
||||
ignore: [
|
||||
"**/manifest-**",
|
||||
"**/dist/**",
|
||||
"**/src/**",
|
||||
"**/ryd.content-script.js",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
from: './Extensions/combined/manifest-firefox.json',
|
||||
to: './dist/firefox/manifest.json'
|
||||
from: "./Extensions/combined/manifest-firefox.json",
|
||||
to: "./firefox/manifest.json",
|
||||
}
|
||||
]
|
||||
})
|
||||
]
|
||||
],
|
||||
}),
|
||||
new FileManagerPlugin({
|
||||
events: {
|
||||
onEnd: {
|
||||
copy: [
|
||||
{ source: "./Extensions/combined/dist/bundled-content-script.js", destination: "./Extensions/combined/dist/firefox/bundled-content-script.js" },
|
||||
{ source: "./Extensions/combined/dist/bundled-content-script.js", destination: "./Extensions/combined/dist/chrome/bundled-content-script.js" },
|
||||
],
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user