mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
introduce applicationInformationToken
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
586c94bb14
commit
22662dd716
26 files changed
+128
-84
No files matched your search
@@ -17,7 +17,9 @@ const config = [
|
||||
main: path.resolve(__dirname, "..", "src", "main", "library.ts"),
|
||||
},
|
||||
output: {
|
||||
libraryTarget: "commonjs",
|
||||
library: {
|
||||
type: "commonjs2",
|
||||
},
|
||||
path: path.resolve(buildDir, "library"),
|
||||
},
|
||||
optimization: {
|
||||
@@ -32,11 +34,33 @@ const config = [
|
||||
},
|
||||
{
|
||||
...renderer,
|
||||
entry: {
|
||||
common: path.resolve(__dirname, "..", "src", "common", "library.ts"),
|
||||
},
|
||||
output: {
|
||||
library: {
|
||||
type: "commonjs2",
|
||||
},
|
||||
path: path.resolve(buildDir, "library"),
|
||||
},
|
||||
optimization: {
|
||||
minimize: false,
|
||||
},
|
||||
externals: [
|
||||
nodeExternals(),
|
||||
],
|
||||
plugins: [],
|
||||
},
|
||||
{
|
||||
...renderer,
|
||||
name: "lens-app-common",
|
||||
entry: {
|
||||
renderer: path.resolve(__dirname, "..", "src", "renderer", "library.ts"),
|
||||
},
|
||||
output: {
|
||||
libraryTarget: "commonjs",
|
||||
library: {
|
||||
type: "commonjs2",
|
||||
},
|
||||
path: path.resolve(buildDir, "library"),
|
||||
},
|
||||
optimization: {
|
||||
|
||||
+3
-19
@@ -5,16 +5,11 @@
|
||||
|
||||
import path from "path";
|
||||
import type webpack from "webpack";
|
||||
import type { WebpackPluginInstance } from "webpack";
|
||||
import { DefinePlugin } from "webpack";
|
||||
import nodeExternals from "webpack-node-externals";
|
||||
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
||||
import CircularDependencyPlugin from "circular-dependency-plugin";
|
||||
import MonacoWebpackPlugin from "monaco-editor-webpack-plugin";
|
||||
import getTypeScriptLoader from "./get-typescript-loader";
|
||||
import rendererConfig, { iconsAndImagesWebpackRules } from "./renderer";
|
||||
import { appName, assetsFolderName, buildDir, htmlTemplate, isDevelopment, mainDir, publicPath } from "./vars";
|
||||
import { platform } from "process";
|
||||
import { assetsFolderName, buildDir, htmlTemplate, isDevelopment, mainDir, publicPath } from "./vars";
|
||||
import HtmlWebpackPlugin from "html-webpack-plugin";
|
||||
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
||||
|
||||
@@ -29,7 +24,7 @@ const renderer: webpack.Configuration = ({
|
||||
globalAPI: isDevelopment,
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: `${appName}.html`,
|
||||
filename: "index.html",
|
||||
template: htmlTemplate,
|
||||
inject: true,
|
||||
hash: true,
|
||||
@@ -73,18 +68,7 @@ const main: webpack.Configuration = ({
|
||||
...iconsAndImagesWebpackRules(),
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new DefinePlugin({
|
||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
||||
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(main|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
||||
}),
|
||||
new ForkTsCheckerPlugin(),
|
||||
new CircularDependencyPlugin({
|
||||
cwd: __dirname,
|
||||
exclude: /node_modules/,
|
||||
failOnError: true,
|
||||
}) as unknown as WebpackPluginInstance,
|
||||
],
|
||||
plugins: [],
|
||||
});
|
||||
|
||||
export {
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ export function webpackLensRenderer({ showVars = true } = {}): webpack.Configura
|
||||
}),
|
||||
|
||||
new HtmlWebpackPlugin({
|
||||
filename: `${appName}.html`,
|
||||
filename: "index.html",
|
||||
template: htmlTemplate,
|
||||
inject: true,
|
||||
hash: true,
|
||||
|
||||
Reference in new issue
Block a user