Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sucrase/webpack-loader

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sucrase/webpack-loader - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

dist/index.js

@@ -5,5 +5,7 @@ "use strict";

function loader(code) {
const webpackRemainingChain = loader_utils_1.getRemainingRequest(this).split("!");
const filePath = webpackRemainingChain[webpackRemainingChain.length - 1];
const options = loader_utils_1.getOptions(this);
return sucrase_1.transform(code, options);
return sucrase_1.transform(code, Object.assign({ filePath }, options));
}
module.exports = loader;
{
"name": "@sucrase/webpack-loader",
"version": "1.0.0",
"version": "1.0.1",
"description": "Webpack loader for Sucrase",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,9 +0,11 @@

import {getOptions} from "loader-utils";
import {getOptions, getRemainingRequest} from "loader-utils";
import {Options, transform} from "sucrase";
function loader(code: string): string {
const webpackRemainingChain = getRemainingRequest(this).split("!");
const filePath = webpackRemainingChain[webpackRemainingChain.length - 1];
const options: Options = getOptions(this) as Options;
return transform(code, options);
return transform(code, {filePath, ...options});
}
export = loader;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc