nuxt-community / adonuxt-template

[Deprecated] Starter template for Nuxt.js with AdonisJS.
451 stars 61 forks source link

Unable to import npm module in less #121

Open padinko opened 5 years ago

padinko commented 5 years ago

Version

latest

Reproduction link

http://example.com

Steps to reproduce

npm install normalize.css

@import "~normalize.css";

What is expected ?

it compiles less file and it will include normalize.css

What is actually happening?

Module build failed (from ./node_modules/postcss-loader/src/index.js): friendly-errors 15:08:14
Error: Can't resolve '~normalize.css' in 'C:\web\work\zeo-adonuxt\resources\assets\less'

Additional comments?

Hello, in less-loader there is native alias ~ for importing npm modules, but in adonuxt it's imposibble. there is problem probably with your alias, which is the same as less-loader alias ~

This bug report is available on Nuxt community (#c98)