webpack-angular-source-map

1.0.2 • Public • Published

webpack-angular-source-map

Webpack loader for Angular which allows debugging of source files by automatically adding sourceURL. Especially useful for SASS and LESS.

Why?

When working with Angular 5+ (and potentially some previous versions as well), the complied sass, scss and less files are displayed as inline style. When debugging, it consumes a lot of time to trace back the source file.

This loader automatically adds /*# sourceURL=[FILENAME] */ to the relevant files, and thus showing the file names when debugging.

Before:

After:

How to use

In the relevant loaders section, add this loader after the "raw-loader". Example:

{
  ...
  "test": /\.scss$|\.sass$/,
  "use": [
    {
      "loader": "raw-loader"
    },
    {
      "loader": "webpack-angular-source-map"
    },
    ...
  ]
}

Package Sidebar

Install

npm i webpack-angular-source-map

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

10.1 kB

Total Files

9

Last publish

Collaborators

  • matanarbel