A sh loader for webpack. Transform .sh file to an object.
To begin, you'll need to install sh-loader
:
npm install sh-loader --save-dev
Then add the loader to your webpack
config. For example:
webpack.config.js
module.exports = {
module: {
rules: [
{
test: /\.sh$/,
use: "sh-loader"
},
],
},
};
Now, you can import sh file.
import sh from './xxx.sh'
console.log(sh)
And run webpack
via your preferred method.
Name | Type | Default | Description |
---|---|---|---|
parse | {Boolean} |
true |
Enable/Disable parse |