Skip to content

the-forks/script-loader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

script loader module for webpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%