Comments (7)
@eugenio165 Have you solved yet?
@artf Any idea why this is happening? I am also facing this issue.
from preset-webpage.
@MudassarSandhu Yes, unfortunately i had to disable aot and buildOptimizer on my prod build...
If you find a better solution, update me please, thanks
from preset-webpage.
Yeah, i did find a solution which fixed my error. How are you importing and initializing the grapesjs-preset-webpage plugin?
Use the old method like
import grapesjs from 'grapesjs';
import 'grapesjs-preset-webpage';
And in the initialization of builder
plugins: ['grapesjs-preset-webpage'],
pluginsOpts: {
'gjs-preset-webpage': {
},
}
}
Add the grapesjs script and plugin script in angular json file in scripts tag like this
But order matters if you have any other script in the scripts tag
"scripts": [
"./node_modules/grapesjs/dist/grapes.min.js",
"./node_modules/grapesjs-preset-webpage/dist/grapesjs-preset-webpage.min.js",
]
from preset-webpage.
I see... so you can build with prod configurations like that? You didnt have to use my fix (disable AOT and Optimization)?
My implementation is exactly like yours, but my grapesjs scripts aren't the first in the array in the angular json file. I'm too busy currently to go back and try to play around with the project i used this on, but once i have time i'll go check if placing the grapesjs scrips first in the array allows me to build with AOT and Optimization.
from preset-webpage.
@eugenio165 yeah i can build with prod configurations. In my project's anular.json file, grapesjs is not the first. I have imported other scripts but i showed you that as an example.
from preset-webpage.
@MudassarSandhu Just to be clear, i can build with prod configurations, but i'll get the error i stated in this issue. When i build without AOT and BuildOptimizer, this error doesnt occur. My implementation is EXACTLY like yours, the only thing that could differ is the order of the scripts array, and maybe the order of the imports in the file i use grapesjs in.
When you build in prod, does grapesjs work correctly?
Thanks mate
from preset-webpage.
For now, I'm closing this as I can't reproduce it, but if you believe the issue is still there, please create a reproducible demo.
from preset-webpage.
Related Issues (20)
- [Question] Adding Inlined CSS command for grapesjs-preset-webpage HOT 1
- Style Manager- double list of style menu HOT 5
- Color box opens outside the visible page HOT 4
- How to install extensions/plugins? [help]
- Saving Issue HOT 3
- grapesjs-preset-webpage HOT 1
- How to render content
- Unable to choose background colour at demo site HOT 1
- auto select stylemanager causes some problems HOT 1
- This repository can't be built due to core-js HOT 2
- DragMode absolute now working after update to v0.19.5 HOT 2
- Headers are not being added to AssetManager GET requests HOT 1
- Most icons way too big HOT 2
- Cant build the preset HOT 1
- i am not find this source dist/grapesjs-preset-webpage.min.css also js. Can anyone help me please
- How add more blocks HOT 2
- Got Typescript errors when building HOT 3
- Classes on the body get removed by grapesjs HOT 1
- Styles are deleted for all pages when import content
- index.html
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from preset-webpage.