Comments (4)
according to this #33 data is every time a empty object.
from pug-html-loader.
Hi @giacomoalonzi, Please use
p= title
instead
p= data.title
from pug-html-loader.
@willyelm thank you for reply, I did it but nothing happened, no data is visualized.
from pug-html-loader.
@willyelm ok fixed
I changed this
{
test: /\.pug$/,
exclude: ['/node_modules/'],
use: ['html-loader', `pug-html-loader?${qs.stringify({
options: {
debug: !isProduction,
pretty: true,
data: {
title: 'hello',
home: require('./src/content/home.json')
}
}
})}`]
},
to this
{
test: /\.pug$/,
exclude: ['/node_modules/'],
use: [
'html-loader',
{
loader: 'pug-html-loader',
query: {
pretty: true,
data: {
title: 'hello',
home: require('./src/content/home.json')
}
}
}
]
}
qs.stringify cause the issue.
Thank you :)
from pug-html-loader.
Related Issues (20)
- Replace parseQuery() with getOptions() HOT 1
- move from v1.1.0 to v1.1.1 broken HOT 1
- webpack2 support? HOT 3
- attributes with sharp symbol HOT 2
- Pug locals compilation HOT 1
- Using src=require() doesnt work HOT 3
- How to use css-loader(local scoped) with pug-html-loader?
- Use include ~components/foo.pug HOT 2
- Cant' accesso tu htmlWebpackPlugins.options.title
- inline background-image (require) HOT 4
- [Feature Request] Allow us to access the name of the current file from within the options
- Use the new way to declare rules in Readme
- Add support for loader-utils.interpolateName()
- Require a css file? HOT 1
- Not compiling using new pug syntax
- Cannot read property 'call' of undefined HOT 1
- Angular syntax not working HOT 1
- unexpected text "* nor" ——/* normalize component */ HOT 1
- How to pass data when loader is used inline
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pug-html-loader.