mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
fix code styling
This commit is contained in:
+26
-23
@@ -1,6 +1,7 @@
|
||||
const path = require('path');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const path = require("path");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const ESLintPlugin = require("eslint-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
performance: {
|
||||
@@ -8,51 +9,53 @@ module.exports = {
|
||||
maxEntrypointSize: 512000,
|
||||
maxAssetSize: 512000,
|
||||
},
|
||||
devtool: 'cheap-module-source-map',
|
||||
devtool: "cheap-module-source-map",
|
||||
entry: {
|
||||
'SEQTA': './src/SEQTA.js',
|
||||
'background': './src/background.js',
|
||||
'inject-documentload': './src/inject/documentload.css', // Entry for CSS
|
||||
'inject-iframe': './src/inject/iframe.css', // Entry for CSS
|
||||
'inject-injected': './src/inject/injected.css', // Entry for CSS
|
||||
SEQTA: "./src/SEQTA.js",
|
||||
background: "./src/background.js",
|
||||
"inject-documentload": "./src/inject/documentload.css", // Entry for CSS
|
||||
"inject-iframe": "./src/inject/iframe.css", // Entry for CSS
|
||||
"inject-injected": "./src/inject/injected.css", // Entry for CSS
|
||||
},
|
||||
output: {
|
||||
filename: (pathData) => {
|
||||
const name = pathData.chunk.name.replace('inject-', '');
|
||||
return name.includes('inject') ? `inject/${name}.js` : `${name}.js`;
|
||||
const name = pathData.chunk.name.replace("inject-", "");
|
||||
return name.includes("inject") ? `inject/${name}.js` : `${name}.js`;
|
||||
},
|
||||
path: path.resolve(__dirname, 'build'),
|
||||
// eslint-disable-next-line no-undef
|
||||
path: path.resolve(__dirname, "build"),
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
'css-loader',
|
||||
],
|
||||
include: path.resolve(__dirname, 'src'),
|
||||
use: [MiniCssExtractPlugin.loader, "css-loader"],
|
||||
// eslint-disable-next-line no-undef
|
||||
include: path.resolve(__dirname, "src"),
|
||||
},
|
||||
{
|
||||
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
||||
type: 'asset/resource',
|
||||
type: "asset/resource",
|
||||
generator: {
|
||||
filename: 'src/[path][name][ext]',
|
||||
filename: "src/[path][name][ext]",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new ESLintPlugin(),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: (pathData) => {
|
||||
const name = pathData.chunk.name.replace('inject-', '');
|
||||
return name.includes('inject') ? `inject/${name}.css` : `inject/${name}.css`;
|
||||
const name = pathData.chunk.name.replace("inject-", "");
|
||||
return name.includes("inject")
|
||||
? `inject/${name}.css`
|
||||
: `inject/${name}.css`;
|
||||
},
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{ from: 'public', to: '.' },
|
||||
{ from: 'src/inject/preview', to: 'inject/preview' },
|
||||
{ from: "public", to: "." },
|
||||
{ from: "src/inject/preview", to: "inject/preview" },
|
||||
],
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user