From b66d88434edd41ecbb80a61ad4aeb4540d9c8299 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Thu, 19 Oct 2023 19:14:10 -0700 Subject: [PATCH] build: revert to JS webpack config Signed-off-by: Varun Patil --- tsconfig.json | 7 +------ webpack.config.ts => webpack.config.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 15 deletions(-) rename webpack.config.ts => webpack.config.js (88%) diff --git a/tsconfig.json b/tsconfig.json index a85ca80a..692ccd2c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,10 +17,5 @@ }, "vueCompilerOptions": { "target": 2.7 - }, - "ts-node": { - "compilerOptions": { - "module": "CommonJS", - } - }, + } } \ No newline at end of file diff --git a/webpack.config.ts b/webpack.config.js similarity index 88% rename from webpack.config.ts rename to webpack.config.js index 42c91fc2..ad3760af 100644 --- a/webpack.config.ts +++ b/webpack.config.js @@ -1,13 +1,13 @@ -import webpack from 'webpack'; -import path from 'path'; +const webpack = require('webpack'); +const path = require('path'); -import WorkboxPlugin from 'workbox-webpack-plugin'; -import TerserPlugin from 'terser-webpack-plugin'; -import NodePolyfillPlugin from 'node-polyfill-webpack-plugin'; -import { VueLoaderPlugin } from 'vue-loader'; +const WorkboxPlugin = require('workbox-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); +const NodePolyfillPlugin = require('node-polyfill-webpack-plugin'); +const { VueLoaderPlugin } = require('vue-loader'); -const appName = process.env.npm_package_name!; -const appVersion = process.env.npm_package_version!; +const appName = process.env.npm_package_name; +const appVersion = process.env.npm_package_version; const buildMode = process.env.NODE_ENV; const isDev = buildMode === 'development'; console.info('Building', appName, appVersion, '\n'); @@ -38,7 +38,7 @@ module.exports = { // Make sure sourcemaps have a proper path and do not // leak local paths https://github.com/webpack/webpack/issues/3603 devtoolNamespace: appName, - devtoolModuleFilenameTemplate(info: any) { + devtoolModuleFilenameTemplate(info) { const rootDir = process.cwd(); const rel = path.relative(rootDir, info.absoluteResourcePath); return `webpack:///${appName}/${rel}`;