Skip to content

Commit

Permalink
incremental has some odd behaviors with eleventy.before
Browse files Browse the repository at this point in the history
- removing --incremental from npm start
- swap esBuild.js to eleventy.after
  • Loading branch information
edheltzel committed Aug 8, 2023
1 parent 19cd8d0 commit 7b87507
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _flightdeck/transforms/esBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const { sassPlugin } = require("esbuild-sass-plugin");
const postcss = require("postcss");
const cssDeclarationSorter = require("css-declaration-sorter");
const postcssPresetEnv = require("postcss-preset-env");

// TODO: need more testing of eleventy.before causes issues with --incremental builds
module.exports = (config) => {
const flightdeck = console.log('\x1b[33m%s\x1b[0m', '[Flightdeck] ' + '>> esbuild complete');
config.on("eleventy.before", async () => {
config.on("eleventy.after", async () => {
await esbuild.build({
bundle: true,
entryPoints: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"sass": "^1.64.2"
},
"scripts": {
"start": "eleventy --serve --incremental",
"start": "eleventy --serve",
"build": "run-s clean build:11ty",
"build:11ty": "cross-env ENV=production eleventy",
"preview": "npx http-server ./dist -p 8080",
Expand Down

0 comments on commit 7b87507

Please sign in to comment.