diff --git a/packages/freesewing.lab/components/pattern-picker.js b/packages/freesewing.lab/components/pattern-picker.js
index 7d5a85ee970..dca79364251 100644
--- a/packages/freesewing.lab/components/pattern-picker.js
+++ b/packages/freesewing.lab/components/pattern-picker.js
@@ -1,5 +1,4 @@
import React from 'react'
-import config from 'site/freesewing.config.js'
import DesignIcon from 'shared/components/icons/design.js'
import Link from 'next/link'
@@ -16,15 +15,15 @@ const PatternPicker = ({ app }) => {
Patterns
- {Object.keys(config.patterns).map(section => (
+ {Object.keys(app.patterns).map(section => (
-
- {t(config.navigation[section].__title)}
+ {t(app.navigation[section].__title)}
- {config.patterns[section].map(pattern => (
+ {app.patterns[section].map(pattern => (
-
))
-const ListPage = ({ sections=Object.keys(config.patterns) }) => {
+const PatternListPageTemplate = ({ sections=Object.keys(config.patterns) }) => {
const app = useApp()
return (
@@ -33,7 +33,7 @@ const ListPage = ({ sections=Object.keys(config.patterns) }) => {
{Object.keys(config.navigation).map(section => {
if (sections.indexOf(section) !== -1) return (
-
+
{config.navigation[section].__title}
{links(section, config.patterns[section])}
@@ -48,4 +48,4 @@ const ListPage = ({ sections=Object.keys(config.patterns) }) => {
)
}
-export default ListPage
+export default PatternListPageTemplate
diff --git a/packages/freesewing.lab/pages/blocks/brian.js b/packages/freesewing.lab/pages/blocks/brian.js
new file mode 100644
index 00000000000..b3fc7df6f4e
--- /dev/null
+++ b/packages/freesewing.lab/pages/blocks/brian.js
@@ -0,0 +1,4 @@
+import pattern from 'pkgs/brian/src/index.js'
+import PageTemplate from 'site/page-templates/workbench.js'
+
+export default () =>
diff --git a/packages/freesewing.shared/components/wrappers/workbench.js b/packages/freesewing.shared/components/wrappers/workbench.js
index 77b994521e3..9817ab7f3df 100644
--- a/packages/freesewing.shared/components/wrappers/workbench.js
+++ b/packages/freesewing.shared/components/wrappers/workbench.js
@@ -38,7 +38,6 @@ const WorkbenchWrapper = ({ app, pattern }) => {
// State for display mode and gist
const [mode, setMode] = useState(null)
const [gist, setGist] = useState(defaultGist(pattern, app.language))
- const [fuck, setFuck] = useState('')
// If we don't have the requiremed measurements,
// force mode to measurements
diff --git a/packages/freesewing.shared/config/next.mjs b/packages/freesewing.shared/config/next.mjs
index 248aa7101c6..51ceaed483d 100644
--- a/packages/freesewing.shared/config/next.mjs
+++ b/packages/freesewing.shared/config/next.mjs
@@ -1,7 +1,17 @@
import path from 'path'
import remarkGfm from 'remark-gfm'
+import { patterns } from '../../../config/packages.mjs'
-const config = (site, remarkPlugins=[]) => ({
+/*
+ * This mehthod will return the NextJS configuration
+ * Parameters:
+ *
+ * site: one of 'dev', 'org', or 'lab'
+ * remarkPlugins: Array of remark plugins to load
+ * srcPkgs: Array of folders in the monorepo/packages that should be aliased
+ * so they are loaded from source, rather than from a compiled bundle
+ */
+const config = (site, remarkPlugins=[], srcPkgs=[]) => ({
experimental: {
externalDir: true,
esmExternals: true,
@@ -48,6 +58,10 @@ const config = (site, remarkPlugins=[]) => ({
config.resolve.alias.site = path.resolve(`../freesewing.${site}/`)
config.resolve.alias.markdown = path.resolve(`../../markdown/${site}/`)
config.resolve.alias.pkgs = path.resolve(`../`)
+ // This forces webpack to load the code from source, rather than compiled bundle
+ for (const pkg of srcPkgs) {
+ config.resolve.alias[`@freesewing/${pkg}$`] = path.resolve(`../${pkg}/src/index.js`)
+ }
return config
}