script-loader
v0.7.2
Published
script loader module for webpack
Downloads
714,784
Keywords
Readme
npm install --save-dev script-loader
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';