Jeremy Sullivan
Jeremy Sullivan

Reputation: 1005

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.

Upvotes: 6

Views: 226

Answers (1)

Johannes Ewald
Johannes Ewald

Reputation: 17815

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

Upvotes: 2

Related Questions