Comments (4)
I think the following config is already doing the minification by lines
jsc: {
minify: { sourceMap: true }
},
minify: true,
Our intent is to not include ua-parser-js
library in the bundle in certain cases because of its size. For those purposes we were using @rollup/plugin-alias
, which replace it with mocked module, that returned null
. And this plugin stopped working after starting using rollup-plugin-swc3
Is there any idea how I can solve this problem?
from rollup-plugin-swc.
rollup-plugin-swc3
acts more as an alternative to @rollup/plugin-typescript
rather than rollup-plugin-terser
. If you intend to replace terser
, you could import swcMinify
from rollup-plugin-swc3
instead.
from rollup-plugin-swc.
Is there any idea how I can solve this problem?
Could you provide a minimum reproduction so I can pinpoint the issue?
rollup-plugin-swc3
has implemented a customized module resolving to work with TypeScript files while @swc/core
can expand aliased imports during the transformation. Although I suspect that this might be the cause of the issue, I can't rectify it without a minimal reproduction.
In the meantime, swcMinify
doesn't include a customized module resolving and swc transformation. Therefore simply importing swcMinify
from rollup-plugin-swc3
might be the quickest workaround for this issue.
from rollup-plugin-swc.
Thanks for suggestions! Basically, I was able to achieve it by using rollup-plugin-ignore
instead
from rollup-plugin-swc.
Related Issues (20)
- README out of date with regards to tsconfig extends support HOT 1
- tsconfig is support object HOT 1
- fallbackBindings.transform is not a function HOT 2
- Deno HOT 3
- Treating module as external dependency HOT 2
- Type '"typescript"' is not assignable to type '"ecmascript"'.ts(2322) HOT 1
- unknown variant `es6` HOT 1
- How to generate .d.ts file? HOT 8
- Unable to use ES module configuration file since `0.9.1` HOT 5
- Remove experimental decorators check from SWC config HOT 2
- SWC error: `jsc.baseUrl` must be absolute HOT 3
- Error: `env` and `jsc.target` cannot be used together HOT 5
- [Improvement] Add warn message when tsconfig is invalid HOT 1
- Cannot handle export ts type HOT 2
- Verify rollup v4 works and add to peerDependencies HOT 2
- Locally linked node_modules breaks `tsconfig.json` resolution HOT 1
- Circular dependency issue HOT 1
- Reading `.swcrc` automatically? HOT 2
- Relative `baseUrl` path in `tsconfig.json` causes `base_dir(...) must be absolute` error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rollup-plugin-swc.