mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
parent
630928d6ba
commit
9b0318b493
@ -70,10 +70,10 @@ const getInjectables = (environment: "renderer" | "main", filePathGlob: string)
|
|||||||
global.injectablePaths = {
|
global.injectablePaths = {
|
||||||
renderer: {
|
renderer: {
|
||||||
globalOverridePaths: getInjectables("renderer", "*.global-override-for-injectable.{ts,tsx}"),
|
globalOverridePaths: getInjectables("renderer", "*.global-override-for-injectable.{ts,tsx}"),
|
||||||
paths: getInjectables("renderer", "*.{injectable,injectable.testing-env}.{ts,tsx}"),
|
paths: getInjectables("renderer", "*.injectable.{ts,tsx}"),
|
||||||
},
|
},
|
||||||
main: {
|
main: {
|
||||||
globalOverridePaths: getInjectables("main", "*.global-override-for-injectable.{ts,tsx}"),
|
globalOverridePaths: getInjectables("main", "*.global-override-for-injectable.{ts,tsx}"),
|
||||||
paths: getInjectables("main", "*.{injectable,injectable.testing-env}.{ts,tsx}"),
|
paths: getInjectables("main", "*.injectable.{ts,tsx}"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -67,8 +67,8 @@ const webpackLensMain = (): webpack.Configuration => {
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new DefinePlugin({
|
new DefinePlugin({
|
||||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable\\.tsx?$/`,
|
||||||
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(main|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(main|common)\\/.+\\.injectable\\.tsx?$/`,
|
||||||
}),
|
}),
|
||||||
new ForkTsCheckerPlugin({
|
new ForkTsCheckerPlugin({
|
||||||
typescript: {
|
typescript: {
|
||||||
|
|||||||
@ -12,7 +12,6 @@ import type { WebpackPluginInstance } from "webpack";
|
|||||||
import { optimize, DefinePlugin } from "webpack";
|
import { optimize, DefinePlugin } from "webpack";
|
||||||
import nodeExternals from "webpack-node-externals";
|
import nodeExternals from "webpack-node-externals";
|
||||||
import { isDevelopment, buildDir, sassCommonVars } from "./vars";
|
import { isDevelopment, buildDir, sassCommonVars } from "./vars";
|
||||||
import { platform } from "process";
|
|
||||||
|
|
||||||
export function webpackLensRenderer(): webpack.Configuration {
|
export function webpackLensRenderer(): webpack.Configuration {
|
||||||
return {
|
return {
|
||||||
@ -84,8 +83,8 @@ export function webpackLensRenderer(): webpack.Configuration {
|
|||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
new DefinePlugin({
|
new DefinePlugin({
|
||||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable\\.tsx?$/`,
|
||||||
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable\\.tsx?$/`,
|
||||||
}),
|
}),
|
||||||
new ForkTsCheckerPlugin({}),
|
new ForkTsCheckerPlugin({}),
|
||||||
|
|
||||||
|
|||||||
@ -50,8 +50,8 @@ const main: webpack.Configuration = ({
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new DefinePlugin({
|
new DefinePlugin({
|
||||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable\\.tsx?$/`,
|
||||||
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable\\.tsx?$/`,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|||||||
@ -81,8 +81,8 @@
|
|||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
new DefinePlugin({
|
new DefinePlugin({
|
||||||
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_NON_FEATURES: `/\\.injectable\\.tsx?$/`,
|
||||||
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable(\\.${platform})?\\.tsx?$/`,
|
CONTEXT_MATCHER_FOR_FEATURES: `/\\/(renderer|common)\\/.+\\.injectable\\.tsx?$/`,
|
||||||
}),
|
}),
|
||||||
new ForkTsCheckerPlugin(),
|
new ForkTsCheckerPlugin(),
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user