@knot/webpack-plugin v1.10.0
@knot/webpack-plugin
A
webpackplugin to automatically handle parsing and transformingknotcode.
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-pluginUsage
In order to use knot modules with webpack only requires 2 pieces of configuration.
- Add
'.kn'to the list of extensions to consider when resolving modules - Add an instance of the
KnotPluginto 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
Contributing
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
License
MIT © 2019 Ben Teichman
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago