1.10.0 • Published 4 years ago

@knot/webpack-plugin v1.10.0

Weekly downloads
20
License
MIT
Repository
github
Last release
4 years ago

@knot/webpack-plugin

npm code style: prettier lerna semantic-release Commitizen friendly standard-readme compliant

CircleCI

A webpack plugin to automatically handle parsing and transforming knot code.

Integrate knot into your existing webpack build easily using this plugin.

Table of Contents

Install

npm install @knot/webpack-plugin
# or
yarn add @knot/webpack-plugin

Usage

In order to use knot modules with webpack only requires 2 pieces of configuration.

  1. Add '.kn' to the list of extensions to consider when resolving modules
  2. Add an instance of the KnotPlugin to the list of plugins
// webpack.config.js
import KnotPlugin from '@knot/webpack-plugin';

module.exports = {
  // add these to your existing configuration

  resolve: {
    extensions: ['.kn', '.js']
  },

  plugins: [
    new KnotPlugin({
      // optionally print an exhaustive log of the operation of the compiler
      // debug: true,
    })
  ]
};

You will now be able to import a .kn file from any normal javascript file. When running webpack, these files will be automatically converted into native javascript modules.

There is also a more robust example.

Maintainers

@effervescentia

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2019 Ben Teichman

1.10.0

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.0

5 years ago

1.1.1-dev-1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago