|
il y a 3 ans | |
---|---|---|
.. | ||
.npmignore | il y a 3 ans | |
CHANGELOG.md | il y a 3 ans | |
LICENSE | il y a 3 ans | |
README.md | il y a 3 ans | |
addScript.js | il y a 3 ans | |
index.js | il y a 3 ans | |
package.json | il y a 3 ans |
npm install --save-dev script-loader
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' ]
}
]
}
}
import exec from 'script-loader!./script.js';
|
Juho Vepsäläinen
|
Joshua Wiens
|
Kees Kluskens