Comments (6)
If I understand you correctly and your html is minified in development, then you can paste this line of code parts.loadPug({ pretty: true })
into the dev config. You can pass any options to Pug this way.
from webpack-pug-scss-boilerplate.
This what I want!! But, It's doesn't' work...
Error: options/query provided without loader (use loader + options) in {
"test": {},
"use": [
{
"loader": "html-loader"
},
{
"loader": "pug-html-loader"
}
],
"options": {
"pretty": true
}
}
at Function.normalizeRule (W:\code_test\kepical_teste\node_modules\webpack\lib\RuleSet.js:179:10)
at rules.map (W:\code_test\kepical_teste\node_modules\webpack\lib\RuleSet.js:86:20)
at Array.map ()
at Function.normalizeRules (W:\code_test\kepical_teste\node_modules\webpack\lib\RuleSet.js:85:17)
at new RuleSet (W:\code_test\kepical_teste\node_modules\webpack\lib\RuleSet.js:80:24)
at new NormalModuleFactory (W:\code_test\kepical_teste\node_modules\webpack\lib\NormalModuleFactory.js:49:18)
at Compiler.createNormalModuleFactory (W:\code_test\kepical_teste\node_modules\webpack\lib\Compiler.js:480:31)
at Compiler.newCompilationParams (W:\code_test\kepical_teste\node_modules\webpack\lib\Compiler.js:493:30)
at Compiler.compile (W:\code_test\kepical_teste\node_modules\webpack\lib\Compiler.js:501:23)
at compiler.applyPluginsAsync.err (W:\code_test\kepical_teste\node_modules\webpack\lib\Compiler.js:82:18)
at next (W:\code_test\kepical_teste\node_modules\tapable\lib\Tapable.js:202:11)
at Compiler.compilerInvalid (W:\code_test\kepical_teste\node_modules\webpack-dev-middleware\lib\Shared.js:161:
- at next (W:\code_test\kepical_teste\node_modules\tapable\lib\Tapable.js:204:14)
at Compiler.compiler.plugin (W:\code_test\kepical_teste\node_modules\webpack\lib\CachePlugin.js:32:5)
at next (W:\code_test\kepical_teste\node_modules\tapable\lib\Tapable.js:204:14)
at linterSuccess (W:\code_test\kepical_teste\node_modules\stylelint-webpack-plugin\lib\run-compilation.js:36:9
)
from webpack-pug-scss-boilerplate.
I think I've figured it out. First, please, download the new version (1.1.2) of the boilerplate. Then, make the following changes to the webpack.config.js
:
- Move this line to the production config
- Add
parts.loadPug({ pretty: true })
to the dev config
Everything should work now.
from webpack-pug-scss-boilerplate.
I download last version (1.1.2). And and I did the whole process again...
Error only when I put parts.loadPug({ pretty: true })
to dev config.
Failed to compile.
ERROR in ./app/index.pug
Module not found: Error: Can't resolve './""' in 'W:\code_test\webpack-pug-scss\app'
@ ./app/index.pug 1:406-425
@ ./app/scripts/index.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app/scripts
ERROR in Error: Child compilation failed:
Module not found: Error: Can't resolve './""' in 'W:\code_test\webpack-pug-scss\app':
Error: Can't resolve './""' in 'W:\code_test\webpack-pug-scss\app'
-
compiler.js:76
[webpack-pug-scss]/[html-webpack-plugin]/lib/compiler.js:76:16 -
Compiler.js:300 compile
[webpack-pug-scss]/[webpack]/lib/Compiler.js:300:11 -
Compiler.js:510 applyPluginsAsync.err
[webpack-pug-scss]/[webpack]/lib/Compiler.js:510:14 -
Tapable.js:202 next
[webpack-pug-scss]/[tapable]/lib/Tapable.js:202:11 -
CachePlugin.js:78 Compiler.
[webpack-pug-scss]/[webpack]/lib/CachePlugin.js:78:5 -
Tapable.js:206 Compiler.applyPluginsAsyncSeries
[webpack-pug-scss]/[tapable]/lib/Tapable.js:206:13 -
Compiler.js:507 compilation.seal.err
[webpack-pug-scss]/[webpack]/lib/Compiler.js:507:11 -
Tapable.js:195 Compilation.applyPluginsAsyncSeries
[webpack-pug-scss]/[tapable]/lib/Tapable.js:195:46 -
Compilation.js:680 self.applyPluginsAsync.err
[webpack-pug-scss]/[webpack]/lib/Compilation.js:680:19 -
Tapable.js:195 Compilation.applyPluginsAsyncSeries
[webpack-pug-scss]/[tapable]/lib/Tapable.js:195:46 -
Compilation.js:671 self.applyPluginsAsync.err
[webpack-pug-scss]/[webpack]/lib/Compilation.js:671:11 -
Tapable.js:195 Compilation.applyPluginsAsyncSeries
[webpack-pug-scss]/[tapable]/lib/Tapable.js:195:46 -
Compilation.js:666 self.applyPluginsAsync.err
[webpack-pug-scss]/[webpack]/lib/Compilation.js:666:10 -
Tapable.js:195 Compilation.applyPluginsAsyncSeries
[webpack-pug-scss]/[tapable]/lib/Tapable.js:195:46 -
Compilation.js:662 sealPart2
[webpack-pug-scss]/[webpack]/lib/Compilation.js:662:9 -
Tapable.js:195 Compilation.applyPluginsAsyncSeries
[webpack-pug-scss]/[tapable]/lib/Tapable.js:195:46
from webpack-pug-scss-boilerplate.
Make sure that you're actually moving this line to the production config and not copying it.
from webpack-pug-scss-boilerplate.
Closed due to lack of activity. Feel free to reopen if the issue is still relevant.
from webpack-pug-scss-boilerplate.
Related Issues (20)
- Module build failed: Error: Command failed: /var/www/webpack-pug-scss-boilerplate/node_module s/mozjpeg/vendor/cjpeg HOT 1
- Wrong assets path after production build HOT 2
- TypeError: Cannot read property 'properties' of undefined HOT 1
- Empty file, includes or extends doesn't work
- Multi page tweaks not working
- How to use your boilerplate, it's always fail HOT 4
- How to inject stylesheet on yarn build? HOT 1
- How can i use whitout main.js ?
- How do I include Bootstrap css and js? HOT 1
- Modern web development HOT 1
- [Help needed] Create Blog with this boilerplate HOT 1
- I was try to use multiple pages HOT 1
- Cant to use multiple pages
- Custom fonts not working when building HOT 3
- Webpack font's wrong publicPath when building
- а как ложить всю статику (допустим) в assets, а сгенеренный html оставлять в корне? HOT 1
- may I know how to make the build not to add random number after assets? HOT 2
- Is it for a single page sites? HOT 2
- After installing the modules, i did run, $ npm start . I got this error. I am on Linux Fedora 28, Node version v10.12.0 HOT 2
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 webpack-pug-scss-boilerplate.