{"library":"script-loader","title":"script-loader","description":"A webpack loader that executes JavaScript files once in the global context, useful for loading legacy scripts or libraries that pollute the global scope. Current stable version is 0.7.2, last released September 2017. This loader is part of the webpack-contrib organization and has minimal dependencies. It differs from imports-loader or expose-loader by executing scripts directly, without module wrapping. Does not work in Node.js; designed exclusively for browser bundles. The project is effectively in maintenance mode with no recent updates.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install script-loader"],"cli":null},"imports":["import exec from 'script-loader!./script.js';","const exec = require('script-loader!./script.js');","use: ['script-loader']"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# Install\nnpm install --save-dev script-loader\n\n# webpack.config.js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.exec\\.js$/,\n        use: ['script-loader']\n      }\n    ]\n  }\n};\n\n# Example script.js\n// script.exec.js or import with script-loader! prefix\n// This file runs in global context\nvar globalVar = 'I am global';","lang":"javascript","description":"Configures script-loader to execute .exec.js files in the global context. Shows installation, webpack config, and a sample script that sets a global variable.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}