foundation / panini

A super simple flat file generator.
Other
592 stars 105 forks source link

Compatible with webpack? #120

Closed kee0624 closed 7 years ago

kee0624 commented 7 years ago

I feel this features is very good, so I am thinking are you plan to make this compatible with webpack?

gakimball commented 7 years ago

Are you trying to use Panini in the browser?

And either way, can you paste any errors you got when you write import panini from 'panini';?

kee0624 commented 7 years ago

I am using panini for generate dynamic html file for my gulp project. Which for multipage html development instead of app development. but currently approach for htmlwebpack plugin is not working for dynamic filename. which I can't do like

new HtmlWebpackPlugin({ template: 'src/layouts/index.ejs', filename: '[name].html', }),

so want to know do you have any plan for this in the future?

gakimball commented 7 years ago

We don't have any plans for implementing any Webpack loader versions of template engines into Panini. This library is mostly for using Handlebars, EJS, Pug, etc. as-is.

I don't think you'll have much success mixing Panini and Webpack to make a static site, because both libraries are doing the same thing: they're taking template files and compiling them into finished HTML. They can't really share the compiling process.

However, if you could explain to me further what you're trying to do, that would be super helpful :)

york-xtrem commented 7 years ago

The only thing I do not totally change to webpack is by Panini. I think the work you've done with Panini is exceptional and saves me a lot of setup time. If somehow I could integrate it with Webpack would be great!

Not a big problem but I have three bundles:

With gulp-rev-replace when in production I concatenated them in a single bundle. Now all that work of injecting Githubissues.

  • Githubissues is a development platform for aggregating issues.