Webpack automatically inserts transformable.js at the end of body tag. I want to have a script after the <script src="transformable.js"></script>. How can I achieve this?
This is my structure:
I want to have this i.e. load transformable.js first and then have script tag:
This is my webpack config:
import path from "path"
import HtmlWebpackPlugin from "html-webpack-plugin"
export default {
entry: "./src/index.ts",
module: {
rules: [
{
test: /\.tsx?$/,
loader: "babel-loader"
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html"
})
],
output: {
path: path.resolve(__dirname, "dist"),
filename: "transformable.js",
sourceMapFilename: "[name].js.map"
},
devtool: "source-map"
}

