build: revert to JS webpack config

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/888/head
Varun Patil 2023-10-19 19:14:10 -07:00
parent caf0ff3487
commit b66d88434e
2 changed files with 10 additions and 15 deletions

View File

@ -17,10 +17,5 @@
},
"vueCompilerOptions": {
"target": 2.7
},
"ts-node": {
"compilerOptions": {
"module": "CommonJS",
}
},
}
}

View File

@ -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}`;