revert module conversion

This commit is contained in:
Michael C 2022-06-30 21:39:28 -04:00
parent cc7d7c0a0c
commit 4119fd8433
No known key found for this signature in database
GPG key ID: FFB04FB3B878B7B4
6 changed files with 17 additions and 19 deletions

View file

@ -3,7 +3,6 @@
"version": "1.0.0",
"description": "",
"main": "background.js",
"type": "module",
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"

View file

@ -1,15 +1,12 @@
/* eslint-disable @typescript-eslint/no-var-requires */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import webpack from "webpack"
import path from "path"
import { fileURLToPath } from "url"
import CopyPlugin from "copy-webpack-plugin"
import BuildManifest from "./webpack.manifest.cjs";
const srcDir = "../src/";
import fs from "fs";
import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const webpack = require("webpack");
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const BuildManifest = require('./webpack.manifest');
const srcDir = '../src/';
const fs = require("fs");
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const edgeLanguages = [
"de",
@ -27,7 +24,7 @@ const edgeLanguages = [
"zh_CN"
]
export default env => ({
module.exports = env => ({
entry: {
popup: path.join(__dirname, srcDir + 'popup.ts'),
background: path.join(__dirname, srcDir + 'background.ts'),

View file

@ -1,7 +1,8 @@
import { merge } from "webpack-merge";
import common from './webpack.common.js';
/* eslint-disable @typescript-eslint/no-var-requires */
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
export default env => merge(common(env), {
module.exports = env => merge(common(env), {
devtool: 'inline-source-map',
mode: 'development'
});

View file

@ -1,7 +1,8 @@
import { merge } from "webpack-merge";
import common from './webpack.common.js';
/* eslint-disable @typescript-eslint/no-var-requires */
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
export default env => {
module.exports = env => {
let mode = "production";
env.mode = mode;