liukang b4b8ddf15d admin-vue 1 年之前
..
.npmignore b4b8ddf15d admin-vue 1 年之前
CHANGELOG.md b4b8ddf15d admin-vue 1 年之前
LICENSE b4b8ddf15d admin-vue 1 年之前
README.md b4b8ddf15d admin-vue 1 年之前
addScript.js b4b8ddf15d admin-vue 1 年之前
index.js b4b8ddf15d admin-vue 1 年之前
package.json b4b8ddf15d admin-vue 1 年之前

README.md

npm node deps chat

Script Loader

Install

npm install --save-dev script-loader

Usage

Executes JS script once in global context.

:warning: Doesn't work in NodeJS

Config (recommended)

import exec from 'script.exec.js';

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.exec\.js$/,
        use: [ 'script-loader' ]
      }
    ]
  }
}

Inline

import exec from 'script-loader!./script.js';

Maintainers

Juho VepsäläinenJoshua WiensKees Kluskens
Sean Larkin