Topic: Issue with MDB Pro 4.8.2 and Webpack 4.33
Joe Yong free asked 5 years ago
Expected behavior Updated MDB Pro from 4.7.7 to 4.8.2. Everything was running fine with Webpack 4.33. Update from 4.7.7 to 4.8.2 should not break the code
Actual behavior Error when loading the compiled JS - Uncaught ReferenceError: bsCustomFileInput is not defined at HTMLDocument. (mdb.min.js:1) (anonymous) @ mdb.min.js:1
Resources (screenshots, code snippets etc.) No code change, just updated the version from 4.7.7 to 4.8.2. Puzzled what broke?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Opened
- ForumUser: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.8.0
- Device: Computer
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Bartłomiej Malanowski staff commented 5 years ago
Could you please show us some code? How can we reproduce this issue?
Joe Yong free commented 5 years ago
Create a new project with MDB Pro 4.8.2, and use Webpack 4.33. Create Typescript file main.ts with code - "use strict";
import * as $ from "jquery"; import 'popper.js/dist/umd/popper.min.js'; import 'bootstrap/dist/js/bootstrap.min.js'; import 'mdbootstrap-pro/js/mdb.min.js';
$(document).ready(function () {
});
Webpack configuration as below - var path = require('path'); var webpack = require('webpack'); const CleanWebpackPlugin = require('clean-webpack-plugin'); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
module.exports = function (env) {
};
Error when using MDB Pro 4.8.2. No error with 4.7.7.