Giter Club home page Giter Club logo

file-include-webpack-plugin's People

Contributors

b1nj avatar cannikin avatar davidzoli avatar dependabot[bot] avatar vishal0203 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

file-include-webpack-plugin's Issues

Cannot install with webpack 5

The

npm install --save-dev file-include-webpack-plugin

throws an error:

npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.0.0" from [email protected]

I think the peerDependency should include webpack 5:

peerDependency: {
  webpack: "^4.0.0 || ^5.0.0"
}

Any chance to fix that, please? Would be awesome!

Исправление документации

В документации указаны примеры с Висячей запятой. Плагин выдает ошибку если ее оставить!

 @@include('html/_header.htm', {
        "line": "header_line",
 })

Partial inside partial doesn't work

Hi,
I was happy to read that the plugin supports partials inside partials.
Could you maybe provide an example for that?

I somehow can't manage to get it done, the paths won't resolve.

(For test purposes) I put both partials in the same folder, one below the main index.html:

index.html
/partials/partial1.html
/partials/partial2.html

index.html:
...
@@include('./partials/partial1.html')
...

partial1.html:
...
@@include('./partial2.html')
...

---> resolves as src/partial2.html (not found)

If I include the second partial via @@include('./partials/partial2.html'):
--> resolves as src/partials/partials/partial2.html (not found)

The first partial works fine.

Is this a bug or do I just not get it right? A code example would be great! 👍

Enable the indent option

I've been using gulp-file-include for a lot of years and I am happy to find a similar plugin for Webpack. Great job! I wonder if it's possible to set indent: true in this version for proper indentation of included partials. Thanks!

Error on source path

@Vishal0203 I'm setting up my webpack config file like this:

new FileIncludeWebpackPlugin({
      source: './src/views'
    }),

My error is:

Error: ENOENT: no such file or directory, mkdir '/Users/evan/Documents/Projects/my-framework/dist/partials'

However, if I make my webpack config:

new FileIncludeWebpackPlugin({
      source: './src2/views'
    }),

My error is:

Error: ENOENT: no such file or directory, mkdir '/Users/evan/Documents/Projects/my-framework/src2/partials'

Is this meant to work with webpack dev server ?

ability to require / include assets

we should be able to require images etc in html files and the plugin should be able to resolve that and update that in the build out put.

Problem with webpack dev server

if @@include('html/src'{}) is not the correct path then the webpack dev server stops working and you have to fix the path and also run npm run dev again.

Include in partial

I would like possibility to add includes in partial.
Maybe with the recursive method processFile.

What do you think about that ?

Ability to include partial multiple times

If I want to use an html partial for a card in a grid for example I'd currently have to have markup for the entire grid the the partial.
It would be great if this worked more like gulp-file-include and you could instead include the card partial multiple times and passing different variables for each include

How to have script automatically injected into result

Hello,

I am certain this is the type of plugin I want to easily include partial HTML files in my pages.

However I am a bit lost on how to have this plugin automatically insert the script tags like the html-webpack-plugin does.

Should I be using both of these plugins? if so, how should I be configuring it?

Thanks!

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.