What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello Team, following on from last post... I was reading this article
Hello Team,
following on from last post... I was reading this article
https://docs.spryker.com/docs/scos/dev/front-end-development/zed/overriding-webpack-js-scss-for-zed-on-project-level.html
First part is pretty straight forward.
This part (see attached picture) is somehow unclear (to me) and I find a bit hard to understand:
The newly created entry points for JS files should have suffix .entry
, for example, my-module.entry.js
). Webpack collects all entry points with this suffix.
Use the following path to add all new entry points for your project: ./src/Pyz/Zed/{%ModuleName%}/assets/Zed/js/*.entry.js
.
To extend JS modules from the core level, use aliases. To add a JS module, follow the example:
require('{%AliasName%}/path/to/file.js');
// ORvar ModuleName = require('{%AliasName%}/path/to/file.js');
Where should I add this line? Tnx.
Comments
-
not my domain but try the following:
next to your
*.entry.js
you create amodules
directory where you add your js files(s) likecustom.js
(add some console.log() for testing) and your entry.js should then look like this:'use strict'; require('./modules/custom');
when youβre done run
vendor/bin/console console frontend:zed:build
as it is for ZED0 -
I've done it. And I can see newly created module test.js file in public/Zed/assets/js but I dont see its affects on store front. Any further assistance would be much appreciated. Tnx.
0 -
Where did u create the files (which module) and where do u expect to see something? Which Zed URL?
0 -
Good question. I just realized that I need to implement it in proper module and twig file. :crossed_fingers:
0 -
I did it. Thank you!
0 -
u r welcome!
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random