@linktr.ee/create-link-app 0.3.0-next.35 → 0.3.0-next.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const postcss_1 = __importDefault(require("postcss"));
30
+ const webpack_1 = __importDefault(require("webpack"));
30
31
  const postcssOptions = __importStar(require("../postcss/postcss.config"));
31
32
  const config = {
32
33
  stories: [`${process.cwd()}/src/**/*.stories.@(js|jsx|ts|tsx)`],
@@ -58,5 +59,16 @@ const config = {
58
59
  core: {
59
60
  builder: 'webpack5',
60
61
  },
62
+ webpackFinal: async (config) => {
63
+ if (config.plugins?.length) {
64
+ // Add the DefinePlugin to the Webpack plugins array
65
+ config.plugins.push(new webpack_1.default.DefinePlugin({
66
+ // Does not need to be the real value, just needs to be defined for storybook
67
+ __LINK_TYPE_ID__: JSON.stringify('testLinkappId'),
68
+ __LINK_TYPE_SLUG__: JSON.stringify('test-linkapp-id'),
69
+ }));
70
+ }
71
+ return config;
72
+ },
61
73
  };
62
74
  module.exports = config;
@@ -164,6 +164,8 @@ async function default_1(env, options) {
164
164
  };
165
165
  config.plugins.push(new webpack_1.DefinePlugin({
166
166
  __ALLOW_ANY_ORIGIN__: options?.allowAnyOrigin,
167
+ __LINK_TYPE_SLUG__: JSON.stringify(linkTypeSlug),
168
+ __LINK_TYPE_ID__: JSON.stringify(linkTypeId),
167
169
  }),
168
170
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
169
171
  // @ts-ignore
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.3.0-next.35",
2
+ "version": "0.3.0-next.36",
3
3
  "commands": {
4
4
  "build": {
5
5
  "id": "build",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/create-link-app",
3
- "version": "0.3.0-next.35",
3
+ "version": "0.3.0-next.36",
4
4
  "description": "Create a Link App on Linktr.ee.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Linktree",
@@ -6,3 +6,6 @@ declare module '*manifest.json' {
6
6
  declare module '*props-data.json' {
7
7
  export const name: string
8
8
  }
9
+
10
+ declare const __LINK_TYPE_ID__: string
11
+ declare const __LINK_TYPE_SLUG__: string