mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-12-01 18:31:24 +01:00
Webpack fixes, build now builds both FF and chrome versions
This commit is contained in:
1 parent
96f063838d
commit
d13aa3f051
26 files changed
+3191
-10521
No files matched your search
+51
-7
@@ -1,13 +1,57 @@
|
||||
const path = require("path");
|
||||
const path = require('path');
|
||||
const CopyPlugin = require('copy-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')
|
||||
},
|
||||
externals: {
|
||||
ramda: "R",
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
module: {},
|
||||
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']
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
// exclude locale files in moment
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: './Extensions/combined',
|
||||
to: './dist/chrome',
|
||||
globOptions: {
|
||||
ignore: ['**/manifest-**', '**/dist/**', '**/src/**','**/ryd.content-script.js']
|
||||
}
|
||||
},
|
||||
{
|
||||
from: './Extensions/combined/manifest-chrome.json',
|
||||
to: './dist/chrome/manifest.json'
|
||||
},
|
||||
{
|
||||
from: './Extensions/combined',
|
||||
to: './dist/firefox',
|
||||
globOptions: {
|
||||
ignore: ['**/manifest-**', '**/dist/**', '**/src/**','**/ryd.content-script.js']
|
||||
}
|
||||
},
|
||||
{
|
||||
from: './Extensions/combined/manifest-firefox.json',
|
||||
to: './dist/firefox/manifest.json'
|
||||
}
|
||||
]
|
||||
})
|
||||
]
|
||||
};
|
||||
Reference in new issue
Block a user