fix: remove platform specific injectable file names

- Causes issues due to a single platform being used to build the library

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-04-05 16:17:50 -04:00
1 parent 630928d6ba
commit 9b0318b493
5 files changed
+10 -11

No files matched your search

+2 -2
View File
@@ -67,8 +67,8 @@ const webpackLensMain = (): webpack.Configuration => {
},
plugins: [
new DefinePlugin({
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(main|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable\\.tsx?$/`,
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(main|common)\\/.+\\.injectable\\.tsx?$/`,
}),
new ForkTsCheckerPlugin({
typescript: {
+2 -3
View File
@@ -12,7 +12,6 @@ import type { WebpackPluginInstance } from "webpack";
import { optimize, DefinePlugin } from "webpack";
import nodeExternals from "webpack-node-externals";
import { isDevelopment, buildDir, sassCommonVars } from "./vars";
import { platform } from "process";
export function webpackLensRenderer(): webpack.Configuration {
return {
@@ -84,8 +83,8 @@ export function webpackLensRenderer(): webpack.Configuration {
plugins: [
new DefinePlugin({
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable\\.tsx?$/`,
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable\\.tsx?$/`,
}),
new ForkTsCheckerPlugin({}),