Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piterden/js-create-includes-webpack-plugin
Making WebPack includes creating with JS createElement
https://github.com/piterden/js-create-includes-webpack-plugin
cordova createelement html-webpack-plugin regex webpack
Last synced: about 1 month ago
JSON representation
Making WebPack includes creating with JS createElement
- Host: GitHub
- URL: https://github.com/piterden/js-create-includes-webpack-plugin
- Owner: Piterden
- Created: 2018-09-22T01:55:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T08:17:50.000Z (almost 2 years ago)
- Last Synced: 2024-04-23T20:23:32.636Z (9 months ago)
- Topics: cordova, createelement, html-webpack-plugin, regex, webpack
- Language: JavaScript
- Size: 1.46 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [JSCreateIncludesWebpackPlugin](https://github.com/Piterden/js-create-includes-webpack-plugin)
![Travis (.org)](https://img.shields.io/travis/com/Piterden/js-create-includes-webpack-plugin.svg?style=for-the-badge)
![GitHub search hit counter](https://img.shields.io/github/search/Piterden/js-create-includes-webpack-plugin/webpack.svg?style=for-the-badge)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Piterden/js-create-includes-webpack-plugin.svg?style=for-the-badge)The simple plug-in which allows you to run cordova/webpack app.
## Overview
The WebPack plugin for convert HTML script assignment like:
```html
```
to JS creation of a DOM-element:
```html
const bundleScript = document.createElement('script');
bundleScript.type = 'text/javascript';
bundleScript.async = true;
bundleScript.src = 'bundle.js';
document.body.appendChild(bundleScript);```
## Installation
> ##### Requirements:
>
> - webpack
> - html-webpack-plugin```sh
$ npm i js-create-includes-webpack-plugin -D
```## Usage
Add to you WebPack config file the next:
```js
const JSCreateIncludesWebpackPlugin = require('js-create-includes-webpack-plugin')// ...
module.exports = {
plugins: [
// Place it after HtmlWebpackPlugin
new JSCreateIncludesWebpackPlugin(),
],
}
```## Credits
Author: Denis Efremov [@piterden](https://github.com/piterden)
## Donate
- **BTC** `3F275vPSCvYW19MHZqSjw79fEwwU4MbTgV`
- **LTC** `MGMCQB3QAcrSBjU3eGJviqB2J2f5BNVRGr`
- **DOGE** `D5m69FRDGEn3G3xuakvqTxUpGVt6NegKJp`