Skip to content

Commit

Permalink
Update server to support asset change detection
Browse files Browse the repository at this point in the history
Also did a refactoring on the server to match eslint config.
  • Loading branch information
JosefBredereck committed Apr 12, 2020
1 parent a298bdc commit f56ba66
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 127 deletions.
24 changes: 24 additions & 0 deletions packages/core/src/lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,30 @@ const server = patternlab => {
patternlab.config.paths.public.root
)
);
defaults.assets = [
path.resolve(
path.join(
process.cwd(),
patternlab.config.paths.source.js,
'**',
'*.js' // prevent preprocessors like typescript from reloading
)
),
path.resolve(
path.join(process.cwd(), patternlab.config.paths.source.images)
),
path.resolve(
path.join(process.cwd(), patternlab.config.paths.source.fonts)
),
path.resolve(
path.join(
process.cwd(),
patternlab.config.paths.source.css,
'**',
'*.css' // prevent preprocessors from reloading
)
),
];

// allow for overrides should they exist inside patternlab-config.json
const liveServerConfig = Object.assign(
Expand Down

0 comments on commit f56ba66

Please sign in to comment.