npm.devtool.tech
👏 You can access script-loader package with using scriptLoader variable in browser devtools!
script loader module for webpack

code/package/bundle size

0B
publish
0B
install
0B
bundle minified
0B
bundle gzipped

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

Joshua Wiens

Kees Kluskens

Sean Larkin
🔎Explore Package🔎CDN Script

Score

Popularity31/100
Quality52/100
Maintenance18/100

Dependencies

DevDependencies