Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Webpack Project have issues #6

Open
technicalbirdVayuz opened this issue Aug 18, 2022 · 1 comment
Open

Example Webpack Project have issues #6

technicalbirdVayuz opened this issue Aug 18, 2022 · 1 comment

Comments

@technicalbirdVayuz
Copy link

technicalbirdVayuz commented Aug 18, 2022

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

@technicalbirdVayuz
Copy link
Author

technicalbirdVayuz commented Aug 18, 2022

Also, If you try running sample project, normally then also it does not work, Same kind of errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant