Skip to content

Example Webpack Project have issues #6

@technicalbirdVayuz

Description

@technicalbirdVayuz

Hello,

I was using this to build a Website but I am facing issues. The latest one is with the sample project. Sharing the steps to reproduce the error

  1. Step 1 : Clone
  2. Step 2: Install Mini Mongo Package (@blastjs/minimongo)
  3. Step 3: Go to main.js & remove header.html & sidebar.html
    // require('./header.js'); // require('./sidenav.js')
  4. Step 4: Make main.js should look like
    `
import { ReactiveVar } from '@blastjs/reactive-var';
const { LocalCollection } = require("@blastjs/minimongo/dist/local_collection");
export const Data = new LocalCollection("data");

// require('./header.js');
// require('./sidenav.js');
require('./main.html');

Template.main.onCreated(function onCreated() {
  setInterval(function(){
    Data.insert({data: Date.now()})
  },1000);
});

Template.main.helpers({
  allData() {
    return Data.find({});
  },
});

`
Go to inside main.html

<template name="main">
  {{#each allData}}
  {{data}}
  {{/each}}
</template>

This time, everything will work as expected but if you change main.html to this

<template name="main">
  <div> Hello</div>  
  
  {{#each allData}}
  {{data}}
  {{/each}}
</template>

This would stop working. You will not be able to compile using npx webpack

Sharing the logs too
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions