1
0
Fork 0

chore(fs.dev): Webpack aliases to load local code from source

These changes force webpack to load the local pacakges (like
patterns and so on) from source, rather than from a compiled bundle.
This means that the lab site will reload whenever one makes changes
to pattern code.
This commit is contained in:
Joost De Cock 2022-01-24 12:34:29 +01:00
parent 2169994f0a
commit 2ea353a475
7 changed files with 35 additions and 10 deletions

View file

@ -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 }) => {
<span>Patterns</span>
</div>
<ul tabIndex="0" className="p-2 shadow menu dropdown-content bg-base-100 rounded-box w-52 max-h-96 overflow-y-scroll">
{Object.keys(config.patterns).map(section => (
{Object.keys(app.patterns).map(section => (
<React.Fragment key={section}>
<li className={`
capitalize font-bold text-base-content text-center
opacity-50 border-b2 my-2 border-base-content
`}>
{t(config.navigation[section].__title)}
{t(app.navigation[section].__title)}
</li>
{config.patterns[section].map(pattern => (
{app.patterns[section].map(pattern => (
<li key={pattern}>
<Link href={`/${section}/${pattern}`}>
<button className="btn btn-sm btn-ghost text-base-content">