This module can import or require Svelte files, node modules and local files into Svelte files.
It properly puts the imports within Svelte's script tag and keeps the imports organized.
Use the command dialog or the shortcut Ctrl+Shift+1
. You can also use Ctrl+Shift+2
to import/require and insert the reference at the current cursor position.
For destructuring import use ctrl+shift+3
. First select module, then select one or more export properties.
lodash
will be named _
and jQuery will be $
).This module is a fork from tgreen7's Node Require which is a fork of Bitkompagniet Node Require, which was itself a fork of Quick Require. The typical namings were taken from NodeRequirer for Sublime Text.