Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

statikbe/webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpack

How to start

yarn
yarn run takeoff:install
yarn run watch

Purgecss

Selectize

In order to keep selectize working whitelist these classes:

whitelistPatterns: [//selectize/, /selectize-input dropdown-active/],

Modaal

In order to keep modaal working whitelist these classes:

whitelistPatterns: [/modaal/, /modaal-*/],

Configure hot reloading

With hot reloading enabled, the browser updates automatically when .js or .scss/.css file changes are detected.

Important!

yarn run watch and yarn run dev will not work when the .env file contains a DEV_SERVER_URL

Add environment variables to your local .env file

./.env
DEV_SERVER_URL=https://[project code].local.statik.be:3000/
DEV_SERVER_PORT=3000
DEV_SERVER_HOST=[project code].local.statik.be

Update all references to js and css in the blade templates

./resources/views/layouts/base.blade.php
@if (env('DEV_SERVER_URL')) 
<script type="text/javascript" src="{{env('DEV_SERVER_URL')}}js/main.js"></script>
@else
<script type="text/javascript" src="js/main.js"></script>
@endif

Start the dev server

yarn hot