rollup-plugin-swc3
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -69,3 +69,3 @@ 'use strict'; | ||
const resolveFile = async (resolved, index = false)=>{ | ||
const fileWithoutExt = path.join(path.dirname(resolved), path.basename(resolved, path.extname(resolved))); | ||
const fileWithoutExt = resolved.replace(INCLUDE_REGEXP, ''); | ||
for (const ext of ACCEPTED_EXTENSIONS){ | ||
@@ -110,3 +110,2 @@ const file = index ? path.join(resolved, `index${ext}`) : `${fileWithoutExt}${ext}`; | ||
const swcOptionsFromTsConfig = { | ||
filename: id, | ||
jsc: { | ||
@@ -137,5 +136,5 @@ externalHelpers: tsconfigOptions.importHelpers, | ||
jsc: { | ||
minify: undefined // Disable minify ob transform, do it on renderChunk | ||
minify: undefined // Disable minify on transform, do it on renderChunk | ||
}, | ||
// filename: id, | ||
filename: id, | ||
include: undefined, | ||
@@ -142,0 +141,0 @@ exclude: undefined, |
{ | ||
"name": "rollup-plugin-swc3", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Use SWC with Rollup to transform ESNext and TypeScript code.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import type { Plugin } from 'rollup'; | ||
import fs from 'fs'; | ||
import { extname, resolve, dirname, join, basename } from 'path'; | ||
import { extname, resolve, dirname, join } from 'path'; | ||
import { createFilter, FilterPattern } from '@rollup/pluginutils'; | ||
@@ -33,3 +33,3 @@ import { Options as SwcOptions, JscTarget, transform as swcTransform, minify as swcMinify, JsMinifyOptions } from '@swc/core'; | ||
const resolveFile = async (resolved: string, index = false) => { | ||
const fileWithoutExt = join(dirname(resolved), basename(resolved, extname(resolved))) | ||
const fileWithoutExt = resolved.replace(INCLUDE_REGEXP, ''); | ||
@@ -94,3 +94,2 @@ for (const ext of ACCEPTED_EXTENSIONS) { | ||
const swcOptionsFromTsConfig: SwcOptions = { | ||
filename: id, | ||
jsc: { | ||
@@ -122,5 +121,5 @@ externalHelpers: tsconfigOptions.importHelpers, | ||
jsc: { | ||
minify: undefined // Disable minify ob transform, do it on renderChunk | ||
minify: undefined // Disable minify on transform, do it on renderChunk | ||
}, | ||
// filename: id, | ||
filename: id, | ||
include: undefined, // Rollup's filter is not compatible with swc | ||
@@ -127,0 +126,0 @@ exclude: undefined, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33200
573