@emnapi/rollup-plugin-emscripten-esm-library
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@emnapi/rollup-plugin-emscripten-esm-library

See https://github.com/toyobayashi/emnapi/blob/main/packages/ts-transform-emscripten-esm-library#readme

// rollup.config.mjs
import { defineConfig } from 'rollup'
import rollupEmscriptenEsmLibrary from '@emnapi/rollup-plugin-emscripten-esm-library'

export default defineConfig({
  /* ... */
  output: {
    /* ... */

    /**
     * required,
     * ensure no import declaration left in the final output
     */
    format: 'esm'
  },
  plugins: [
    rollupEmscriptenEsmLibrary({
      /** @type {string[]} */
      defaultLibraryFuncsToInclude: [ /* ... */],

      /** @type {string[]} */
      exportedRuntimeMethods: [ /* ... */ ],

      /** @type {boolean} */
      processDirective: true,

      /** @type {boolean} */
      processParseTools: true

      /** @type {string} */
      runtimeModuleSpecifier: 'emscripten:runtime',

      /** @type {string} */
      parseToolsModuleSpecifier: 'emscripten:parse-tools'
    })
  ]
})

Readme

Keywords

none

Package Sidebar

Install

npm i @emnapi/rollup-plugin-emscripten-esm-library

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

7.05 kB

Total Files

6

Last publish

Collaborators

  • toyobayashi