All Projects → webpack-contrib → Script Loader

webpack-contrib / Script Loader

Licence: mit
[deprecated] Script Loader

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Script Loader

standard-loader
webpack loader for linting your code with https://github.com/feross/standard
Stars: ✭ 66 (-79.82%)
Mutual labels:  webpack-loader
web-components-loader
Webpack loader that makes it incredibly easy to import HTML-centric Web Components into your project.
Stars: ✭ 34 (-89.6%)
Mutual labels:  webpack-loader
Graphql Let
A layer to start/scale the use of GraphQL code generator.
Stars: ✭ 282 (-13.76%)
Mutual labels:  webpack-loader
slim-lang-loader
Webpack loader: slim => html => javascript
Stars: ✭ 20 (-93.88%)
Mutual labels:  webpack-loader
scalajs-webpack-loader
Webpack loader for Scala.js
Stars: ✭ 24 (-92.66%)
Mutual labels:  webpack-loader
sass-to-string
webpack loader that transform your SCSS file in a javascript string
Stars: ✭ 17 (-94.8%)
Mutual labels:  webpack-loader
vue-template-compiler-loader
Webpack loader to pre-compile Vue 2.0 templates
Stars: ✭ 26 (-92.05%)
Mutual labels:  webpack-loader
Speedy.js
Accelerate JavaScript Applications by Compiling to WebAssembly
Stars: ✭ 300 (-8.26%)
Mutual labels:  webpack-loader
stylos
Webpack plugin to automatically generate and inject CSS utilities to your application
Stars: ✭ 60 (-81.65%)
Mutual labels:  webpack-loader
Ts Loader
TypeScript loader for webpack
Stars: ✭ 3,112 (+851.68%)
Mutual labels:  webpack-loader
exif-loader
Extract EXIF- & IPTC-data from your JPGs during build-time.
Stars: ✭ 14 (-95.72%)
Mutual labels:  webpack-loader
Webpack-4-boilerplate
🚀 Webpack 4 with ES6+ and SASS,LESS/STYLUS support + dev-server and livereload
Stars: ✭ 55 (-83.18%)
Mutual labels:  webpack-loader
React Proxy Loader
Wraps a react component in a proxy component to enable Code Splitting.
Stars: ✭ 258 (-21.1%)
Mutual labels:  webpack-loader
yaml-frontmatter-loader
[DEPRECATED] Yaml frontmatter loader
Stars: ✭ 12 (-96.33%)
Mutual labels:  webpack-loader
Source Map Loader
extract sourceMappingURL comments from modules and offer it to webpack
Stars: ✭ 294 (-10.09%)
Mutual labels:  webpack-loader
mjml-loader
MJML loader for webpack
Stars: ✭ 27 (-91.74%)
Mutual labels:  webpack-loader
typed-css-modules-loader
💠 Webpack loader for typed-css-modules auto-creation
Stars: ✭ 62 (-81.04%)
Mutual labels:  webpack-loader
Css Hot Loader
This is a css hot loader, which support hot module replacement for an extracted css file.
Stars: ✭ 317 (-3.06%)
Mutual labels:  webpack-loader
Extract Loader
webpack loader to extract HTML and CSS from the bundle
Stars: ✭ 297 (-9.17%)
Mutual labels:  webpack-loader
Istanbul Instrumenter Loader
Istanbul Instrumenter Loader
Stars: ✭ 272 (-16.82%)
Mutual labels:  webpack-loader

npm node deps chat

! NO LONGER MAINTAINED !

This module is deprecated and will no longer be maintained.

It has a known issue of generating non-deterministic hashes (see #49, #56, #60). Do not use it.

In most cases, you can replace the functionality by using raw-loader instead:

- import('script-loader!someScript.js')
+ import('raw-loader!someScript.js').then(rawModule => eval.call(null, rawModule.default))

If you need some transformations to be applied to the script you want to load, you may need to find or write yourself a separate loader for that. Some documentation that might be helpful:


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 './script.exec.js';

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.exec\.js$/,
        use: [ 'script-loader' ]
      }
    ]
  }
}

Inline

import 'script-loader!./script.js';

Options

Name Type Default Description
sourceMap {Boolean} false Enable/Disable Sourcemaps
useStrict {Boolean} true Enable/Disable useStrict

sourceMap

Type: Boolean Default: false

To include source maps set the sourceMap option.

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.script\.js$/,
        use: [
          {
            loader: 'script-loader',
            options: {
              sourceMap: true,
            },
          },
        ]
      }
    ]
  }
}

useStrict

Type: Boolean Default: true

To disable use strict set the useStrict option to false.

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.script\.js$/,
        use: [
          {
            loader: 'script-loader',
            options: {
              useStrict: false,
            },
          },
        ]
      }
    ]
  }
}

Maintainers

Juho Vepsäläinen Joshua Wiens Kees Kluskens Sean Larkin
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].