getting error while integrating bundle.js, and i used "script-loader" in but no use. libraries used vuejs, vuex, ssr, vuetify, webpack.js
Error:
build.js:1 Uncaught ReferenceError: module is not defined
at build.js:1 .
getting error while integrating bundle.js, and i used "script-loader" in but no use. libraries used vuejs, vuex, ssr, vuetify, webpack.js
Error:
build.js:1 Uncaught ReferenceError: module is not defined
at build.js:1 .
change script from
<script src="/dist/build.js"></script>
to
<script nomodule src="/dist/build.js"></script>
add nomodule attribute in script tag, its happen because we used libraryTarget: 'commonjs2' in webpack config
finally my index.html will be like
<!doctype html>
<html lang="en">
<head>
</head>
<body>
<script nomodule src="/dist/build.js"></script>
</body>
</html>
Note:
do not make any changes in src attribute