Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

script-loader

webpack-contrib484.8kMIT0.7.2

script loader module for webpack

readme

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

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

changelog

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.7.2 (2017-09-29)

Bug Fixes

  • IE =< 8 incompatibility regression (#43) (dbb6d54)

0.7.1 (2017-09-12)

Bug Fixes