Giter Club home page Giter Club logo

Comments (5)

leeoniya avatar leeoniya commented on July 20, 2024

actually, you'll need rollup-plugin-typescript2, which supports exporting interfaces. this worked for me:

rollup.config.js:

import typescript from 'rollup-plugin-typescript2';

export default {
  input: './src/cellx.ts',
  output: {
    file: './dist/cellx.umd.js',
    format: 'umd',
    name: 'cellx',
  },
  plugins: [
    typescript()
  ]
}

tsconfig:

"module": "ES2015",

size reduction of cellx.umd.js:

45.0KB -> 39.8KB

from cellx.

Riim avatar Riim commented on July 20, 2024

Hi, done in v1.9.1

from cellx.

leeoniya avatar leeoniya commented on July 20, 2024

nice.

node_modules is still huge :(

https://packagephobia.now.sh/result?p=jest
38.6MB

there are much smaller testing frameworks than jest. for example, mocha + nyc (for coverage) is smaller.

https://packagephobia.now.sh/result?p=awesome-typescript-loader
6.48MB

probably no longer needed since dropping webpack?

i've opened an issue for rollup-pluginutils to update to latest micromatch, too. (this should save 2MB).

rollup/rollup-pluginutils#65

also ezolenko/rollup-plugin-typescript2#161

you can drop package.json into here and see what sticks out: http://npm.broofa.com/. it only analyzes dependencies, so just copy over devDependencies into dependencies.

from cellx.

Riim avatar Riim commented on July 20, 2024

@leeoniya ok, thanks.

from cellx.

leeoniya avatar leeoniya commented on July 20, 2024

@Riim new rollup-plugin-typescript2 is out with 2MB smaller node_modules.

from cellx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.