Code Monkey home page Code Monkey logo

eleventy-webpack's Introduction

Hey there πŸ‘‹, looking for something?

πŸ‘‰ go check out my website instead

eleventy-webpack's People

Contributors

andersk avatar clenemt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eleventy-webpack's Issues

ERR! network request to .../upper-case-1.1.3.tgz failed

npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://artifactory.ubisoft.org/api/npm/npm/upper-case/-/upper-case-1.1.3.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.ubisoft.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

Dependency Error on "npm i" on freshly cloned repository

On freshly cloned repository, "npm i" will result in dependency error:

myuser@My-MacBook-Pro eleventy-webpack-orig % npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: eleventy-webpack@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/markdown-it
npm ERR!   dev markdown-it@"^12.0.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer markdown-it@">= 9.0.0 < 12.0.0" from [email protected]
npm ERR! node_modules/markdown-it-attrs
npm ERR!   dev markdown-it-attrs@"^3.0.3" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/myuser/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myuser/.npm/_logs/2021-02-22T10_55_22_280Z-debug.log

Steps to reproduce:

Slow on save and reload

Hi,

Am new to eleventy and am using this starter, which is great.

The issue I am getting is when I save a file it takes a long time to render the updates

Copied 186 files / Wrote 30 files in 81.07 seconds (2702.3ms each, v0.12.1)
[start:eleventy] [Browsersync] Reloading Browsers...

These are just about 24 hard coded njk pages and 6 blog posts, it just hangs on reloading browser.

Debug shows this, not sure is this normal performance ?

➜ BEST-Static git:(main) DEBUG=Eleventy:Benchmark* npx @11ty/eleventy
Eleventy:Benchmark Benchmark (Configuration): "slug" Nunjucks Filter took 1ms (0.0%, called 8Γ—, 0.1ms each) +0ms
Eleventy:Benchmark Benchmark (Configuration): "url" Nunjucks Filter took 4ms (0.0%, called 10Γ—, 0.4ms each) +1ms
Eleventy:Benchmark Benchmark (Configuration): "displayPostedDate" Nunjucks Filter took 19ms (0.0%, called 18Γ—, 1.0ms each) +0ms
Eleventy:Benchmark Benchmark (Configuration): "format" Nunjucks Filter took 1ms (0.0%, called 28Γ—, 0.1ms each) +0ms
Eleventy:Benchmark Benchmark (Configuration): "formatISO" Nunjucks Filter took 1ms (0.0%, called 28Γ—, 0.0ms each) +1ms
Eleventy:Benchmark Benchmark (Configuration): "image" Nunjucks Async Shortcode took 46ms (0.1%, called 320Γ—, 0.1ms each) +0ms
Eleventy:Benchmark Benchmark (Configuration): "webpack" Nunjucks Async Shortcode took 2ms (0.0%, called 56Γ—, 0.0ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Configuration addPlugin took 2ms (0.0%, called 3Γ—, 0.6ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Searching the file system took 36ms (0.0%, called 3Γ—, 12.1ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Data File took 2ms (0.0%, called 9Γ—, 0.2ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Passthrough Copy File took 973ms (1.2%, called 186Γ—, 5.2ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Template Read took 497ms (0.6%, called 58Γ—, 8.6ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Template Compile took 1ms (0.0%, called 86Γ—, 0.0ms each) +1ms
Eleventy:Benchmark Benchmark (Aggregate): Template Render took 74481ms (95.0%, called 50Γ—, 1489.6ms each) +0ms
Eleventy:Benchmark Benchmark (Aggregate): Template Write took 1426ms (1.8%, called 30Γ—, 47.5ms each) +0ms
Eleventy:Benchmark Benchmark (Data): ./src/case-studies/case-studies.11tydata.json took 1ms (0.0%, called 3Γ—, 0.2ms each) +0ms
Eleventy:Benchmark Benchmark (Data): ./src/blog/blog.11tydata.json took 1ms (0.0%, called 5Γ—, 0.1ms each) +0ms
Copied 186 files / Wrote 30 files in 76.99 seconds (2566.3ms each, v0.12.1)

Start time: (2021-04-21 21:45:06 UTC) [treshold=1%]

module time %

1 /Documents/BEST-Static/.eleventy.js (.eleventy.js) 1.3s β–‡β–‡ 2%
2 ./Config (node_modules/@11ty/eleventy/src/Config.js) 1.4s β–‡β–‡ 2%
3 ./TemplateEngineManager (node_module...venty/src/TemplateEngineManager.js) 1.4s β–‡β–‡ 2%
4 ./EleventyExtensionMap (node_modules...eventy/src/EleventyExtensionMap.js) 1.4s β–‡β–‡ 2%
5 ./TemplateRender (node_modules/@11ty/eleventy/src/TemplateRender.js) 1.4s β–‡β–‡ 2%
6 ./TemplateData (node_modules/@11ty/eleventy/src/TemplateData.js) 1.6s β–‡β–‡ 2%
7 ./src/Eleventy (node_modules/@11ty/eleventy/src/Eleventy.js) 1.7s β–‡β–‡ 2%
Total require(): 3041
Total time: 1m 18.8s

Image shortcode error with β€œjpg” file extensions

FYI, after updating @11ty/eleventy-img to 0.8.0 I was getting this error:

TypeError: Cannot read property 'reverse' of undefined

const fallback = stats[extension].reverse()[0];

After reading through the changes, it turned out to be related to this fix 11ty/eleventy-img#64 (comment).

Regardless of whether the source image uses the jpg or jpeg extension, the returned object will use the jpeg key.

Here’s how I fixed it in my project:

let extension = path.extname(src).slice(1).toLowerCase();

// Normalize β€œjpg” extension to match what @11ty/eleventy-img does
extension = extension == 'jpg' ? 'jpeg' : extension;

Issue : service worker navigation

Getting this issue on console.

The service worker navigation preload request was cancelled before 'preloadResponse' settled. If you intend to use 'preloadResponse', use waitUntil() or respondWith() to wait for the promise to settle.

issue

any suggestions how to resolve this issue

@andersk @clenemt

Is it possible to use the eleventy-image plugin in scss with background-image?

This issue basically explains how to do it

And i've tried to implement it like so:

// shortcodes.js 

imageCss: () => {
    
    function generateImages(genSrc, genWidths){
      let source = path.join(__dirname, "_includes/" , src);
      let options = {
        widths: widths,
        formats: ['jpeg', 'jpg'],
        outputDir: "./_site/assets/images",
        urlPath: "assets/images/",
        useCache: true,
        sharpJpegOptions: {
          quality: 99,
          progressive: true
        }
      };
      // genrate images, ! dont wait
      Image(source, options);
      // get metadata even the image are not fully generated
      return Image.statsSync(source, options);
    }

    function imageCssBackground (){
      const metadata = generateImages(src, widths);
      let markup = [`${selector} { background-image: url(${metadata.jpeg[0].url});} `];
      // i use always jpeg for backgrounds
      metadata.jpeg.slice(1).forEach((image, idx) => {
        markup.push(`@media (min-width: ${metadata.jpeg[idx].width}px) { ${selector} {background-image: url(${image.url});}}`);
      });
      return markup.join("");
    }

    return console.log(imageCssBackground);
  },

and the css is the same as in the issue,
I know my data is flowing through, but as Im quite new to eleventy I am
unsure how to debug this, as you see I return a console.log of the function
but this isnt much help, the console just throws a "no such file or directory, open '_site/404.html'"

Shortcodes.js error, `SyntaxError` was thrown: const lazy = args[4] ?? true;

I get the following error when I try and build the site.

SyntaxError was thrown:
const lazy = args[4] ?? true;
Here are the two lines that have ? in them. Not sure what is wrong as I don't develop.
onst lazy = args[4] ?? true;
const sizes = args[5] ?? defaultSizes;
Could the problem be the ? mark?
Thanks,
Paul

Repository Issue on freshly cloned repository

Steps to reproduce:

I don't have any proxy setup and don't need one.

Error:

npm i
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://artifactory.ubisoft.org/api/npm/npm/html-minifier/-/html-minifier-4.0.0.tgz failed, reason: getaddrinfo ENOTFOUND artifactory.ubisoft.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myuser/.npm/_logs/2021-02-22T10_41_32_057Z-debug.log

Workaround:
delete package-lock.json:

rm package-lock.json
npm i

Can't resolve css background images

Is anyone experiencing Module build failure? I am getting the following message:

[start:webpack ] Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
[start:webpack ] ModuleBuildError: Module build failed (from ./node_modules/css-loader/dist/cjs.js):
[start:webpack ] Error: Can't resolve '/assets/static/venus-velocity-thumbnail.jpg' in '/Users/daniellee/eleventy-webpack-starter-project-20210412-wedding/src/assets/styles'

Any solutions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.