Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When bundling JavaScript with Webpack, what does the @ symbol mean at the beginning of the require/import URL?

I'm using Webpack to bundle my JavaScript application. I saw a developer during a talk that had a line similar to this:

var foo = require('@/foo/bar');

OR

import '@/foo/bar';

What does the @ symbol mean in this case? A co-worker thought that it might be a shortcut to node_modules, and it's extremely difficult to get good search results for this type of question due to ambiguity.

like image 776
Jeremy Sullivan Avatar asked Jan 18 '16 15:01

Jeremy Sullivan


1 Answers

The @ character has no special meaning in Webpack unless you configure it so. I suppose, it was a private npm module.

like image 75
Johannes Ewald Avatar answered Oct 04 '22 00:10

Johannes Ewald