Skip to content

Commit f9864ba

Browse files
committed
ADD: devtool eval sourcemap, example of implementation of an image
1 parent ae70c01 commit f9864ba

File tree

7 files changed

+383
-7
lines changed

7 files changed

+383
-7
lines changed

build/webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = (env) => {
2424
return {
2525
mode: MODE,
2626
target: 'web',
27+
devtool: 'eval-source-map',
2728
context: path.join(__dirname, '../src'),
2829
entry: {
2930
app: path.join(__dirname, '../src/app.js'),

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"name": "my-project",
2+
"name": "webpackp-starter",
33
"version": "0.0.1",
4-
"description": "My project description",
4+
"description": "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.",
55
"author": {
66
"name": "Edgardo Ramírez León",
77
"email": "me@edgardo.com",
88
"url": "https://edgardorl.com"
99
},
10-
"main": "app.js",
11-
"repository": "git@github.com:my-user/my-repo.git",
10+
"main": "src/app.js",
11+
"repository": "git@github.com:SoldierCorp/webpack-starter-pug-sass-es6-jquery.git",
1212
"license": "MIT",
1313
"scripts": {
1414
"test": "echo \"Error: no test specified\" && exit 1",

src/assets/images/image.png

19 KB
Loading

src/assets/styles/layout/_general.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ ul {
3535
li {
3636
list-style: none;
3737
}
38+
39+
.image {
40+
width: 50px;
41+
}

src/views/components/menu.pug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
mixin menu(currentPage)
22
nav.menu
33
ul.menu__ul.ml-auto
4+
li.menu__item
5+
img(src=require('images/image.png'), alt="", title="", class="image")
46
li.menu__item
57
a.menu__link(href='/', class=currentPage === 'home' ? 'active' : '') Home
68
li.menu__item

src/views/pages/blog/example-post.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ block basicSeo
99
meta(name='author' content='')
1010

1111
block manifestBrowserconfigFiles
12-
link(href='../manifest.json', rel='manifest')
13-
meta(name='msapplication-config' content='../browserconfig.xml')
12+
link(href='../../manifest.json', rel='manifest')
13+
meta(name='msapplication-config' content='../../browserconfig.xml')
1414

1515
block content
1616

0 commit comments

Comments
 (0)