Skip to content

Commit

Permalink
switch from require to import of modules and update webdav
Browse files Browse the repository at this point in the history
  • Loading branch information
cracker0dks committed Nov 27, 2023
1 parent 1a4f9c3 commit 585d419
Show file tree
Hide file tree
Showing 23 changed files with 1,160 additions and 1,013 deletions.
16 changes: 10 additions & 6 deletions config/webpack.base.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
const webpack = require("webpack");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
import webpack from "webpack";
import { CleanWebpackPlugin } from "clean-webpack-plugin";
import CopyPlugin from "copy-webpack-plugin";
import HtmlWebpackPlugin from "html-webpack-plugin";
import path from "path";
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const config = {
entry: {
Expand Down Expand Up @@ -57,4 +61,4 @@ const config = {
],
};

module.exports = config;
export { config as default };
8 changes: 4 additions & 4 deletions config/webpack.build.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { merge } = require("webpack-merge");
const baseConfig = require("./webpack.base");
import { merge } from "webpack-merge";
import baseConfig from "./webpack.base.js"

module.exports = merge(baseConfig, {
export default merge(baseConfig, {
mode: "production",
performance: {
hints: false,
Expand All @@ -13,4 +13,4 @@ module.exports = merge(baseConfig, {
nodeEnv: "production",
},
devtool: false,
});
});
9 changes: 5 additions & 4 deletions config/webpack.dev.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { merge } = require("webpack-merge");
const baseConfig = require("./webpack.base");
const webpack = require("webpack");

import baseConfig from "./webpack.base.js";
import { merge } from "webpack-merge";
import webpack from "webpack";

const devConfig = merge(baseConfig, {
mode: "development",
Expand All @@ -11,4 +12,4 @@ const devConfig = merge(baseConfig, {
plugins: [new webpack.NoEmitOnErrorsPlugin()].concat(baseConfig.plugins),
});

module.exports = devConfig;
export { devConfig as default };
Loading

0 comments on commit 585d419

Please sign in to comment.