Home

Issue: 2605

pug-loader doesnt work anymore at new version

[issue link]

when i use 0.10.6 i write the nuxt.config.js like this

build: { loaders: [{ test: /\.(png|jpe?g|gif|svg)$/, loader: 'url-loader', query: { limit: 1, // 10KO name: 'img/[name].[hash:7].[ext]' } }, { test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, loader: 'url-loader', query: { limit: 1000, // 1 KO name: 'fonts/[name].[hash:7].[ext]' } }, { test: /\.(pug)$/, loader: 'pug-loader' }] }

but when upgrade 1.1.1 , i write the same way ,but it doesnt work any more. the console says:

Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type.

i think cause this question is the nuxt@1.1.1 work with webpack3, and the wording changed,so how can i add loaders for new version. hope your help.

This question is available on Nuxt.js community (#c2266)