require is not defined
npm install -g browserify
remove "type": "module" from package.json/*
This type of setup worked for me, require calls modified
to suit my setup.
You will have to enter the postcss-* pkgs listed in your
package.json
*/
module.exports = (ctx) => {
return {
map: ctx.env === 'development' ? 'inline' : false,
plugins: [
require('postcss-csso')()
]
}
} <script>
define([
"jquery",
"mage/translate",
"mage/adminhtml/events",
"mage/adminhtml/wysiwyg/tiny_mce/setup"
], function(jQuery){
wysiwygCompanyDescription = new wysiwygSetup("company_description", {
"width":"100%",
"height":"200px",
"plugins":[{"name":"image"}],
"tinymce4":{"toolbar":"formatselect | bold italic underline | alignleft aligncenter alignright | bullist numlist | link table charmap","plugins":"advlist autolink lists link charmap media noneditable table contextmenu paste code help table",
}
});
wysiwygCompanyDescription.setup("exact");
});
</script>
Also in JavaScript:
- fullcalendar v5 time format am/pm
- set value of attribute using each and keyup jquery
- https request node.js output incomplete
- angular observable cache
- esql convert blob to json
- navigation react pass props
- append after javascript
- javascript collision detection
- get selected option value jquery
- total cost example in javascript with function
- align left text in reactstrap
- what is package.json
- socket io query
- jquery validation prevent negative number
- modify array elements javascript
- how to set time out in js
- route parammap subscribe angular 9
- computed setter
- alpine js open outside div
- react how to pass the input target value
- js pow
- javascript get a random number with 6 digits
- how to get a channelid discord.js
- js check if number has decimals