Froala Editor with Webpack 4
<!doctype html> | |
<html> | |
<head> | |
<title>Froala with Webpack</title> | |
</head> | |
<body> | |
<div id="editor"></div> | |
<script src="dist/bundle.js"></script> | |
</body> | |
</html> |
const path = require('path'); | |
const webpack = require('webpack'); | |
module.exports = { | |
entry: './index.js', | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'bundle.js' | |
}, | |
resolve: { | |
modules: ['node_modules'] | |
}, | |
plugins: [ | |
new webpack.ProvidePlugin({ | |
$: "jquery", | |
jQuery: "jquery" | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
@stefanneculai What would you recommend for a setup that minimizes its output? Webpack recommends using
TerserPlugin
and will apparently be including it as the default minimizer forwebpack@5
. It works fine for me withbut I'm really struggling with having custom plugins work (seeing a lot of(looks like usingt[n] is not a constructor
from froala)function
instead of() =>
syntax played a big role here).I'll consider opening an issue, butdo you have any recommendations for building for production with froala?