| title | webpack-playground-template |
|---|---|
| date | |
| author | Mizok |
| version | 0.9.1 |
| tags |
A webpack boilerplate for playground exmaple showcase that uses ejs as the template engine.
- Run
npm installornpm ifirst to install all dependencies. - Run
npm run devto start the dev-server.
You have to put your examples entry ejs files in ./src/examples/{YOUR_EXAMPLE_NAME}, and you must name it index.ejs, so the full path will be ./src/examples/{YOUR_EXAMPLE_NAME}/index.ejs.
- You have to put your template
ejsfiles in./src/template. - In your
ejsfile which you want to insert your template:
<%- include(`{YOUR_TEMPLATE_PATH(RELATIVE)}`) %>for more detail, please check links below:
first you have to create a folder under src/examples for your new example.
then you will have to add these files into the new folder:
- an
index.ejs - an
index.tsor add atsfolder then add anindex.tsinside it. (Optional) - an
main.scssor add ascssfolder then add anmain.scssinside it. (Optional)
Like this (in your ejs file) :
<div><%= mode%></div> Check if you are using alias path , but not relative path, like below:
<img src="~@img/logo.png">