@hubspot/cms-dev-server 0.10.0 → 0.10.1

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.
Binary file
@@ -628,6 +628,8 @@ ${groupEnd}</script>
628
628
  // src/storybook-main/main.ts
629
629
  import path2 from "path";
630
630
  import { mergeConfig } from "vite";
631
+ import { withoutVitePlugins } from "@storybook/builder-vite";
632
+ import { default as react } from "@vitejs/plugin-react";
631
633
  var webRoot = process.env.WEB_ROOT;
632
634
  var storyPath = path2.resolve(process.cwd(), webRoot, "**/*.stories.*");
633
635
  var jsRenderingGates = process.env.GATES ? process.env.GATES.split(",") : [];
@@ -671,9 +673,30 @@ var main_default = {
671
673
  css: {
672
674
  postcss: webRoot
673
675
  },
674
- plugins: [resolveIslandPlugin2()]
676
+ plugins: [
677
+ resolveIslandPlugin2(),
678
+ react({
679
+ babel: {
680
+ plugins: [
681
+ "babel-plugin-styled-components",
682
+ "styled-jsx/babel",
683
+ "macros"
684
+ ]
685
+ }
686
+ })
687
+ ]
688
+ };
689
+ const configNoReact = {
690
+ ...config,
691
+ // replacing the default usage of `@vite/plugin-react` (it emits multiple
692
+ // sub-plugins listed here) to add our babel plugin configuration
693
+ plugins: await withoutVitePlugins(config.plugins, [
694
+ "vite:react-babel",
695
+ "vite:react-swc",
696
+ "vite:react-refresh"
697
+ ])
675
698
  };
676
- return mergeConfig(config, viteConfig);
699
+ return mergeConfig(configNoReact, viteConfig);
677
700
  }
678
701
  };
679
702
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@hubspot/cli-lib": "^3.0.12",
28
- "@hubspot/cms-components": "^0.10.0",
28
+ "@hubspot/cms-components": "^0.10.1",
29
29
  "@originjs/vite-plugin-commonjs": "^1.0.3",
30
30
  "@storybook/addon-actions": "7.0.7",
31
31
  "@storybook/addon-essentials": "7.0.7",
@@ -101,5 +101,5 @@
101
101
  "publishConfig": {
102
102
  "access": "public"
103
103
  },
104
- "gitHead": "33530a6ecbfd2c6c3ff53dc17d1172f2cd780da8"
104
+ "gitHead": "8e70e43546d6e772b4664da02bcc9eab4bfe04d0"
105
105
  }
@@ -0,0 +1,2 @@
1
+ import { Alias } from 'vite';
2
+ export default function generateBpmAliases(webRoot: string): Alias[];
@@ -0,0 +1,3 @@
1
+ import { Plugin } from 'vite';
2
+ declare const noNodeBuiltinsPlugin: () => Plugin;
3
+ export default noNodeBuiltinsPlugin;
@@ -0,0 +1,2 @@
1
+ import { Plugin } from 'vite';
2
+ export default function devSecretsPlugin(secretNames: Array<string>): Plugin;
@@ -0,0 +1,2 @@
1
+ import { Plugin } from 'vite';
2
+ export default function resolveSharedDeps(): Plugin | null;