Nicely Presented Misnomer
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

script-loader

0.7.2 • Public • Published

npm node deps chat

Script Loader

Install

npm install --save-dev script-loader

Usage

Executes JS script once in global context.

⚠️ 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äinen

Joshua Wiens

Kees Kluskens

Sean Larkin

Keywords

none

install

npm i script-loader

Downloadsweekly downloads

111,892

version

0.7.2

license

MIT

homepage

github.com

repository

githubgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar