fix: improve dev env
This commit is contained in:
@@ -70,12 +70,14 @@ module.exports = function(eleventyConfig) {
|
|||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
// Watch for changes to the compiled CSS and reload the browser.
|
||||||
|
// This is more efficient than `addWatchTarget` which triggers a full rebuild.
|
||||||
|
watch: ['_site/css/style.css'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Watch the Tailwind config file for changes
|
// Watch the Tailwind config file for changes
|
||||||
eleventyConfig.addWatchTarget("./tailwind.config.js");
|
eleventyConfig.addWatchTarget("./tailwind.config.js");
|
||||||
eleventyConfig.addWatchTarget("_site/css/style.css");
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// Set the source and output directories
|
// Set the source and output directories
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
"description": "An Eleventy project with Docker and VS Code debugging.",
|
"description": "An Eleventy project with Docker and VS Code debugging.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prestart": "npm run build:css",
|
"prestart": "npm run build:css",
|
||||||
"start": "npm-run-all -p watch:eleventy watch:css dev:api",
|
"start": "npm-run-all -p serve:eleventy watch:css dev:api",
|
||||||
"watch:eleventy": "eleventy --watch",
|
"serve:eleventy": "eleventy --serve",
|
||||||
"watch:css": "tailwindcss -i ./src/css/input.css -o ./_site/css/style.css --watch",
|
"watch:css": "tailwindcss -i ./src/css/input.css -o ./_site/css/style.css --watch",
|
||||||
"dev:api": "node --watch server.js",
|
"dev:api": "node --watch server.js",
|
||||||
"build": "npm run build:css && eleventy",
|
"build": "npm run build:css && eleventy",
|
||||||
|
Reference in New Issue
Block a user