Name Picker Malfunction

    snowpack-plugin-acorn-injection
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    Snowpack Plugin: Acorn Plugin Injection

    repository license repository license repository license

    A Snowpack plugin to inject Acorn plugins into Rollup's internal configuration.

    Table of Contents

    About

    This project features a Snowpack plugin that injects Acorn plugins into Snowpack's internal Rollup configuration. This resolves various issues with lack of parser support when bundling a Snowpack project's dependencies.

    This project was created as a solution for a StackOverflow post. Relevant topics:

    Usage

    This plugin needs to be installed as a Node.js development dependency and configured within a Snowpack configuration. Instructions are included below.

    Installation

    Installing the plugin as a Node.js development dependency can be done with any of the following package managers:

    • npm:
      npm install --save-dev snowpack-plugin-acorn-injection
      
    • Yarn:
      yarn add --dev snowpack-plugin-acorn-injection
      

    Plugin Options

    Name Type Description
    plugins string[] Acorn plugin dependency names to resolve and inject

    Note: Plugins stated in plugins must be resolvable through Node.js' require(...).

    Configuration Example

    The plugin can be configured with any of Snowpack's configuration types.

    For example, injecting acorn-stage3 can be done with the following example:

    {
      ...
      "plugins": [
        [
          "snowpack-plugin-acorn-injection",
          {
            "plugins": [
              "acorn-stage3"
            ]
          }
        ]
      ],
      ...
    }

    An Important Note: Acorn plugins must be installed separately as development dependencies; this plugin has no transitive Acorn dependencies. In this example, acorn-stage3 is installed as a development dependency in the project.

    License

    Licensed under MIT license.

    Install

    npm i snowpack-plugin-acorn-injection

    DownloadsWeekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    7.96 kB

    Total Files

    5

    Last publish

    Collaborators

    • concisions