Skip to content

Commit

Permalink
Fix admin build with webpack 4 (#6934)
Browse files Browse the repository at this point in the history
* Fix admin build with webpack 4

* Update HtmlFieldTransformer to still support Number fields
  • Loading branch information
alexander-schranz committed Dec 13, 2022
1 parent 68b6afa commit b7e3fc5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion babel.config.json
Expand Up @@ -8,7 +8,8 @@
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-optional-chaining"
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-export-namespace-from"
],
"assumptions": {
"setPublicClassFields": true
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -35,6 +35,7 @@
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.16.5",
"@babel/plugin-proposal-decorators": "^7.4.4",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
Expand Down
Expand Up @@ -10,7 +10,7 @@ export default class HtmlFieldTransformer implements FieldTransformer {
return null;
}

const sanitizedHtml = sanitizeHtml(value, {
const sanitizedHtml = sanitizeHtml(value.toString(), {
allowedTags: ['b', 'em', 'i', 's', 'small', 'strong', 'sub', 'sup', 'time', 'u'],
allowedAttributes: {},
disallowedTagsMode: 'recursiveEscape',
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Expand Up @@ -85,7 +85,7 @@ module.exports = (env, argv) => { // eslint-disable-line no-undef
{
test: /\.js$/,
// eslint-disable-next-line max-len
exclude: /node_modules[/\\](?!(sulu-(.*)-bundle|@ckeditor|ckeditor5|array-move|lodash-es|@react-leaflet|react-leaflet)[/\\])/,
exclude: /node_modules[/\\](?!(sulu-(.*)-bundle|@ckeditor|ckeditor5|array-move|htmlparser2|lodash-es|@react-leaflet|react-leaflet)[/\\])/,
use: {
loader: 'babel-loader',
options: {
Expand Down

0 comments on commit b7e3fc5

Please sign in to comment.