Giter Site home page Giter Site logo

soldiercorp / webpack-starter-pug-sass-es6-jquery Goto Github PK

View Code? Open in Web Editor NEW
103.0 9.0 35.0 2.35 MB

Webpack 5 starter that supports Pug, SASS, ES6 ES7 ES8 ES9 ES10 ES11 ES12, VanillaJS/jQuery... (without framework) and generate URLs without the .html extension.

Home Page: https://webpack-starter.edgardorl.com

License: MIT License

JavaScript 40.56% SCSS 25.64% Pug 33.80%
jquery webpack pug stylus sass webpack-starter yarn webpack-5 es6 es7

webpack-starter-pug-sass-es6-jquery's Introduction

Hi there πŸ––

My name is Edgardo RamΓ­rez LeΓ³n.

Highly skilled Senior Software Engineer with over 12 years of experience in full-stack web and mobile development.

A team-oriented professional with strong technical leadership, adept at solving complex technology problems with creative architectural solutions.

I have a great eye for design, producing precise interfaces using the Pixel Perfect technique.

πŸ“« Feel free to contact me if you need any help :)

webpack-starter-pug-sass-es6-jquery's People

Contributors

dependabot[bot] avatar skuadron45 avatar soldiercorp avatar xiledcreator 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  avatar  avatar  avatar  avatar  avatar

webpack-starter-pug-sass-es6-jquery's Issues

Is there a way to automate adding new pug pages to webpack?

This is a really nice starter file that mimics a lot of what I'm trying to do; however, coming from a similar Gulp boilerplate I've been using, I can't quite figure out how to properly account for new pug pages within the project. It seems like if I am to add/remove a new page, I need to rebuild webpack each time. Is there any way to automate this process? Adding watch: true, to webpack doesn't seem to solve for the problem.

mixin image

mixin catalog-item(img)
img(src=require=img)
.........

+catalog-item( 'images/catalog/catalog2-01.png')

does not work, and does not build correctly

but the full link works, but builds incorrectly

+catalog-item( '/assets/images/catalog/catalog2-01.png')

any icons

Notifications are disabled
Reason: DisabledForApplication Please make sure that the app id is set correctly.
Command Line: C:\web\teosofia\node_modules\node-notifier\vendor\snoreToast\snoretoast-x64.exe -pipeName \.\pipe\notifierPipe-41459ce9-7761-43d4-9c25-e9ce51834ef2 -p C:\web\teosofia\node_modules\webpack-notifier\logo.png -m "Error: ./assets/styles/_app.scss
ModuleBuildError: Module build failed (from ../node_modules/sass-loader/dist/cjs.js):
SassError: File to import not found or unreadable: ~bootstrap-icons.
on line 17 of src/assets/styles/_app.scss

@import "~bootstrap-icons";

Inject JS and CSS in subpages

Problem

The generated build of this starter works great in services to host static websites like Netlify, Digital Ocean, etc.

Buy if you try to upload the generated build to a shared hosting or if you simply do double-click in your local machine, the subpages are not taking the style nor the js because the paths of those that are being injected with HtmlWebpackPlugin are not dynamic for subpages only for the root page.

This is the generated build

image

The Home page which is index.html is the root page so the injections of CSS/JS are ./assets/js/app.css and ./assets/css/app.css.

The Contact page which is contact/index.html should have the injections like these ../assets/js/app.css and ../assets/css/app.css.

Expected behaviour

The Contact page or any other subpage should have the injections like these ../assets/js/app.css and ../assets/css/app.css

How do you resolve your paths in production

I can't build correctly in production mode, the "/" setting in public path seems not work with initial config. My html search a wrong path to css and js bundles.

I try "./" but i can't resolve pictures imported from css.

That's the only tricks i've done for the moment.
In my app.js i do the following import, i also remove url-loader file limit

document.addEventListener("DOMContentLoaded" , function(){

  require.context("./assets/images/", true, /\.(png|svg|jpg|gif)$/);

});

Please help me i don't understand all webpack things...

EDIT : I think it's cause by my desktop cause your initial project without any changes doesn't find bundles..

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.