Skip to content

Commit

Permalink
reformatted
Browse files Browse the repository at this point in the history
  • Loading branch information
maximtrp committed Oct 9, 2024
1 parent 0bdba7e commit cfe591a
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 86 deletions.
4 changes: 2 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import eslint from "@eslint/js"
import tseslint from "typescript-eslint"

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended
eslint.configs.recommended,
...tseslint.configs.recommended
)
168 changes: 84 additions & 84 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,102 +9,102 @@ const path = require("path")

/**@type {import('webpack').Configuration}*/
const config = {
mode: "none",
target: "node",
entry: { extension: "./src/extension.ts" },
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, "out"),
filename: "[name].js",
libraryTarget: "commonjs2",
devtoolModuleFilenameTemplate: "../[resource-path]",
mode: "none",
target: "node",
entry: { extension: "./src/extension.ts" },
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, "out"),
filename: "[name].js",
libraryTarget: "commonjs2",
devtoolModuleFilenameTemplate: "../[resource-path]",
},
devtool: "source-map",
externals: {
vscode: "commonjs vscode",
},
resolve: {
mainFields: ["main"],
extensions: [".ts", ".js"],
alias: {
// provides alternate implementation for node module and source files
},
devtool: "source-map",
externals: {
vscode: "commonjs vscode",
},
resolve: {
mainFields: ["main"],
extensions: [".ts", ".js"],
alias: {
// provides alternate implementation for node module and source files
},
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: "ts-loader",
options: {
compilerOptions: {
module: "es6", // override `tsconfig.json` so that TypeScript emits native JavaScript modules.
},
},
},
],
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: "ts-loader",
options: {
compilerOptions: {
module: "es6", // override `tsconfig.json` so that TypeScript emits native JavaScript modules.
},
},
},
],
},
},
],
},
}

/**@type {import('webpack').Configuration}*/
const webConfig = {
mode: "none",
target: "webworker",
entry: { webExtension: "./src/extension.ts" },
output: {
path: path.resolve(__dirname, "out"),
filename: "[name].js",
libraryTarget: "commonjs",
mode: "none",
target: "webworker",
entry: { webExtension: "./src/extension.ts" },
output: {
path: path.resolve(__dirname, "out"),
filename: "[name].js",
libraryTarget: "commonjs",
},
devtool: "source-map",
externals: {
vscode: "commonjs vscode",
},
resolve: {
mainFields: ["browser", "module", "main"],
extensions: [".ts", ".js", ".mjs"],
alias: {
// provides alternate implementation for node module and source files
},
devtool: "source-map",
externals: {
vscode: "commonjs vscode",
fallback: {
https: require.resolve("https-browserify"),
http: require.resolve("stream-http"),
url: require.resolve("url"),
buffer: require.resolve("buffer"),
Buffer: require.resolve("buffer"),
"process/browser": require.resolve("process/browser"),
},
resolve: {
mainFields: ["browser", "module", "main"],
extensions: [".ts", ".js", ".mjs"],
alias: {
// provides alternate implementation for node module and source files
},
fallback: {
https: require.resolve("https-browserify"),
http: require.resolve("stream-http"),
url: require.resolve("url"),
buffer: require.resolve("buffer"),
Buffer: require.resolve("buffer"),
"process/browser": require.resolve("process/browser"),
},
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: "ts-loader",
options: {
compilerOptions: {
module: "es6", // override `tsconfig.json` so that TypeScript emits native JavaScript modules.
},
},
},
],
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: "ts-loader",
options: {
compilerOptions: {
module: "es6", // override `tsconfig.json` so that TypeScript emits native JavaScript modules.
},
},
},
],
},
plugins: [
new webpack.ProvidePlugin({
process: "process/browser", // provide a shim for the global `process` variable
}),
},
],
optimization: {
concatenateModules: false,
},
},
plugins: [
new webpack.ProvidePlugin({
process: "process/browser", // provide a shim for the global `process` variable
}),
],
optimization: {
concatenateModules: false,
},
}

module.exports = [config, webConfig]

0 comments on commit cfe591a

Please sign in to comment.