Topic: mdb + webpack
GlurG
free
asked 5 years ago
I would like to use MDB together with Webpack, but I encounter the following error after I've bundled my assets:
vendor.bundle.js:20320 Uncaught ReferenceError: Waves is not defined
at Object.<anonymous> (vendor.bundle.js:20320)
at Object.module.exports (vendor.bundle.js:20321)
at __webpack_require__ (vendor.bundle.js:55)
at Object.jQuery.easing.jswing (vendor.bundle.js:20301)
at __webpack_require__ (vendor.bundle.js:55)
at Object.defineProperty.value (vendor.bundle.js:150)
at vendor.bundle.js:153
Is this a known error / limitation? I'm using webpack 3.1.0, here is the relevant part of my webpack config:
const webpack = require("webpack")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const path = require("path")
module.exports = {
"entry": {
"main": "./src/main.ts",
"vendor": [
"mdbootstrap"
]
},
"output": {
"path": path.join(__dirname, "dist"),
"filename": "app.bundle.js",
"publicPath": "/"
},
"module": {
"rules": [{
"test": /.ts$/,
"loader": "ts-loader"
}, {
"test": /.css$/,
"loaders": ["style-loader", "css-loader"]
}
]
},
"resolve": {
"extensions": [".ts", ".js", ".css", ".html"]
},
"plugins": [
new HtmlWebpackPlugin({
"template": "src/index.ejs",
"favicon": "src/favicon.ico"
}),
new webpack.optimize.CommonsChunkPlugin({
"name": "vendor",
"filename": "vendor.bundle.js"
}),
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.ProvidePlugin({
"$": "jquery",
"jQuery": "jquery",
"Tether": "tether",
})
]
}
Add comment
jkilbride
free
answered 5 years ago
This is how I use mdb + webpack...
https://mdbootstrap.com/forums/topic/webpack-support-eta/
Hope it helps.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Specification of the issue
- User: Free
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags