Git Product home page Git Product logo

kirby-webpack's People

Contributors

antoine1000 avatar arnaudjuracek avatar chrtz avatar pqml avatar sija avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kirby-webpack's Issues

semver check for kirby.config.json

would love to have a semver check in kirby.config.json like yarn.lock or package.json do. because auto updating a plugin might break things and without a proper way to fix that apart from removing the package from your kirby package manager and adding a version manually.

great idea

will definitivly check it out asap. <3

Not receiving 404/Error page

When I navigate to a route or page that doesn't exist I get a 200 response - successfully receiving a blank page when I should be receiving a 404.

Deploying from git

Loving this, thank you for creating it. Has sped up my workflow immensely.

In the past I've used FTP to update my live site, but I'd really love to be able to deploy using git from the command line. I know how to deploy a complete git repo, but is there an easy setup to deploy only the contents of the www folder?

Blank panel after upgrading to Kirby 3.6.0

Hi there! I just upgraded my site to Kirby 3.6.0 and the frontend is working fine, however I get a blank page when trying to visit the panel. The console error message reads:

DOMException: Failed to execute 'pushState' on 'History': A history state object with URL 'http://localhost:35411/panel/site' cannot be created in a document with origin 'http://localhost:8080' and URL 'http://localhost:8080/panel/site'.

    at Object.setState (http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/index.js:1:14524)
    at Object.init (http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/index.js:1:12871)
    at a.created (http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/index.js:1:14845)
    at Vt (http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/vendor.js:6:11291)
    at nn (http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/vendor.js:6:25303)
    at a.Cn._init (http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/vendor.js:6:32894)
    at new a (http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/vendor.js:6:30461)
    at http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/vendor.js:6:19454
    at init (http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/vendor.js:6:19485)
    at http://localhost:8080/media/panel/84e399b8f2181ccd73394fdeddff1638/js/vendor.js:6:56812

Am unfortunately not skilled enough to know how to read this and what to do. Any pointers? Thanks in advance!

php not working

After not using it for a while, the start script throws the following error:

[email protected] start /Volumes/Daten/SITES/karinkirby
node scripts/check-preprocessor.js && cross-env NODE_ENV=development node scripts/webpack-serve.js

[1/3] Starting a php server...
[PHP] πŸ’₯ Error: php is not a php binary.
[?] Valid path or command for php:

The path from "which php" didn't work,

thx!

How to adapt to Kirby 3 PHP routing

πŸ‘‹
I am using kirby-webpack with Kirby CMS 3 now and it works great, but there is a problem with the development server.

  • When i upload an image to the panel, the image does not show in the preview/thumbnail.
  • I get this error when using the kirby-builder plugin
    kirby-builder-error-dev

After the npm run build process and starting the build in PHP server php -S localhost:8000 kirby/router.php everything works. The images are there and even the plugin works.

So I tried to install the Kirby routing in the development server but failed.

phpServer = php({ bin: user.devServer.phpBinary || 'php', host: user.devServer.phpHost || 'localhost', root: user.paths.www, verbose: false, promptBinary: true, args, router: user.paths.kirby.core + '/router.php' // Kirby routing })

Am i missing something here?
Thank you very much!

Cant upload files through the panel - β€œNone of the converters in the stack are operational”

I'm not sure if this is related to kirby webpack but the fact is that I can’t upload files using the files field through the panel. It throws an error : β€œNone of the converters in the stack are operational”.

e6cb4147703236e86a4dd4a64e6fdb7de0fb1f0f

The files are correctly uploaded in the content>page folder but not in the media folder. In the panel, the field keeps being empty. In the text file (data), the array corresponding to the field is also empty.

[PHP] Error: php is not a php binary

When I run npm run start I'm getting the following error and it's asking me to type in a 'Valid path or command for php'.

[PHP] Error: php is not a php binary
[?] Valid path or command for php:

I believe this maybe be a consequence of running brew upgrade node for a problem in another project. How can I correct this problem? Any help would be greatly appreciated

use a bundle entry multiple times

when creating a bundle entry in main.config.js it would be nice to be able use same file again and bundle it in multiple different output. like reusing _fonts.css in following example...

const entries = {
  'src/main.js':     'www/assets/main.min.js',
  'src/_fonts.css':  'www/assets/a.css', // reuse. does not work (yet).
  'src/_a.css':      'www/assets/a.css',
  'src/_fonts.css':  'www/assets/b.css', // only last call will work.
  'src/_b.css':      'www/assets/b.css',
}

mb_strpos(): Empty delimiter

I'm having an issue trying to setup the kirby 3 branch from scratch. It works fine on mac, but on windows 10 I'm receiving the error below:

mb_strpos(): Empty delimiter

kirby-error

Font links are not working anymore

Hi, my assets folder setup is like this:

assets
β”œβ”€β”€ builds/
β”‚   β”œβ”€β”€ bundle.css
β”‚   β”œβ”€β”€ bundle.js
β”‚   └── ...
└── fonts/
    └── fontfiles ...

in my css I am linking to url('../fonts/fontfiles')

after running npm run start i get the error Module not found: Error: Can't resolve ...
but if i run npm run build the font is loaded correctly. but on the dev server it won't work.

it is exactly setup like a previous project and it works fine there

Module not found: Error: Can't resolve '@babel/runtime/helpers/classCallCheck'

Looks like including modules is broken:
In InteractiveTitle.js I have:
class InteractiveTitle {
constructor () {
}
}
export default InteractiveTitle

in my index.js I try to include this module:
import InteractiveTitle from './js/objects/InteractiveTitle'

That leads to
Module not found: Error: Can't resolve '@babel/runtime/helpers/classCallCheck'
Module not found: Error: Can't resolve '@babel/runtime/helpers/createClass'

Solution: How to use with Kirby 2.x, since Kirby 3 is out

Kirby's Repos have changed since the release of V3. The "legacy" v2 versions are now on: https://github.com/getkirby-v2

What most likely will happen: If you run '$yarn start' or $npm run start - Kirby and Panel will be updated to V3 and nothing will work any more :)

So, to use your existing Kirby 2 Setup with kirby-webpack, do the following:

  1. Change the repo urls inside kirby.config.json:
    { "modules": { "core": "https://github.com/getkirby-v2/kirby.git", "panel": "https://github.com/getkirby-v2/panel.git", .....
  2. Run either $npm run kirby:update -- --force, or if you use yarn $yarn kirby:update --force
  3. VoilΓ ! :)

kirby not updating

Hi, kirby was recently updated to 2.5.8 but when I run:
npm run kirby:update

I get:
πŸ•› [Kirby Updater] Nothing to update.

and on the panel still says Kirby version: 2.5.7

thanks.

browsersync: reload when content files are edited

Currently BrowserSync is set up to ignore files in the 'content' directory. If this were to be removed, you would get live updates when the content is edited. I can't see any downsides to it, but maybe I am missing something.

kirby-next support

I am fooling around with kirby next and your awsome kirby-webpack (version pre-release 0.8.0). this is what i did.

  • got alpha-9 code from slack-channel/notion (kirby next Kirby 3 fellowship package required for access) and used these files (kirby, panel, content,...)
  • needed to rename the plugin file from kirby-webpack.php to index.php
  • and removed all modules from kirby.config.json to disable your kirby plugin manager

but i am stuck at getting browsersync to work. it gets loaded but does not use the hot-reload files but plain css/js files.

probably since i can not set the url in kirby next config (yet, since c helper class does not exist anymore). but maybe thats not necessary with kirby next's new server classes.

i hope you can give me a pointer how to solve this. thanks.

JSON content representations

Great work on the starterpack!
I noticed, you didn't managed to get JSON content representations working with the dev server either.. any idea whats the problem? I guess it has something to do with dots in urls.. would love to fix this!

Sourcemaps are embeded into build .js files

Since version 0.10 sourcemaps instead of being built as separate .map files are embeded into the file itself expading its size considerably. This IMO ought to be reverted to previous behavior (for production builds at least).

Found 1 low severity vulnerability

npm install finds a vulnerability that requires manual review and cannot be updated by npm audit fix.

npm audit yields:

                       === npm audit security report ===                        
                                                                                
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                Manual Review                                 β”‚
β”‚            Some vulnerabilities require your attention to resolve            β”‚
β”‚                                                                              β”‚
β”‚         Visit https://go.npm.me/audit-guide for additional guidance          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Low           β”‚ Regular Expression Denial of Service                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Package       β”‚ debug                                                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patched in    β”‚ >= 2.6.9 < 3.0.0 || >= 3.1.0                                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Dependency of β”‚ browser-sync [dev]                                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Path          β”‚ browser-sync > localtunnel > debug                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ More info     β”‚ https://nodesecurity.io/advisories/534                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
found 1 low severity vulnerability in 7697 scanned packages
  1 vulnerability requires manual review. See the full report for details.

Compile time

The compilation of one project takes me even 15s.
Can I make a mistake somewhere?

Thanks

Chunk files in root dist folder

Hello!

I am using the great kirby-webpack with a gia-setup which is outputting JS-chunks into the root dist folder (www) and not into www/assets with all the other js-bundles. Any idea why that might be and how I could fix it?

Any help is greatly appreciated!

Leftover files in www/

Since version 0.10, after issuing npm run build command I've noticed there are leftover files being left in www/ folder (styles.1.chunk.js, styles.css).

php is not a php binary// macOS Big Sur

hi!
Thanks for your great work. Just want to use it under macOS Big Sur but the php server could not start.
[1/3] Starting a php server...
[PHP] πŸ’₯ Error: php is not a php binary.

On macOS Catalina it works!

CSS Sourcemap paths

Hey, thanks for your great work. I got a little optimization request:
The CSS Sourcemap Reference in Chrome is the whole path like "/Users/Me/Sites/project-name/src/scss/common/_global.scss".
So sometimes the important last part "/common/_global.scss" gets cutted out because of the long path name. Is it possible to get a shortened Version of the path?
Thank you.

recover from webpack error on browsersync refresh

when an error is thrown by webpack compiler it would be nice to continue using dev server once the broken file (cs/js whatever) is changed – on browser sync event. currently one has to ctrl-c and npm run dev again.

Clean Install, panel assets not loading (Windows 10)

As stated in the title.
I wanted to start working on a new project, cloned this project and installed all the dependencies via npm install. Now when I log in to the panel, it just loads forever. Using Dev Tools I see that the most of the panel assets (css, js, fonts, img) aren't loading. Any Idea what might be causing this?
image

As you can see in the screenshot some of the CSS files are being loaded, some aren't. Very strange.

Panel keeps redirecting on clean install

When having a clean install of 'kirby-webpack' (+ onboil πŸ‘€) on Mac OSX the /panel keeps redirecting back to the current page. No errors are shown except the warning:

⚠  Warning: 
Node can't reach PHP built-in server through localhost.
Proxying [::1]:35411 instead.

This warning was explained in this closed issue, so that isn't the problem I guess.

Files layout

While working with this setup, I find myself having to dig for directories like content / site, which I use often when developing a site.

Also it feels like there are a lot of config files in the root, which I won't be using very often.

I was wondering if a file layout like this might make sense:

  • config
    • kirby.config.json
    • main.config.js
    • postcss.config.js
    • webpack.config
  • content
    • content files for kirby
  • site
    • kirby site
  • src
    • javascript files
  • style
    • sass / less files
  • www
    • assets
    • panel
    • kirby
    • thumbs

Hashes for production

How difficult would it be to implement a hash generation for production assets?

Thanks

Can't update Kirby with npm script

npm run kirby:update won't work anymore.

πŸ•›  [Kirby Updater] Nothing to update.
 β†ͺ unchanged https://github.com/getkirby/kirby.git

It still says I run Kirby 3.3.3, while 3.4.2 was released a few days ago.

Loading timeout / blank page

Hi,

the initial setup only displays a blank page and the browser timeouts while loading. The only solution I found is to use my own local proxy (via proxy setting in main.config.js).

Is there anything I could try?

System: Mac OS 10.13.4

Thanks!

Is there a way to disable only the browser reload?

Hello there,

When on the checkout page using the Merx Plugin, the browser keeps reloading infinitely. Maybe anyone knows where the problem may be, but for right now, it would be easier to just disable the automatic browser reload. Is there a way to do that?

dot in url

I get a 404 when trying to access urls like localhost:8080/foo.bar/.

I've found some links about disabling the dot rule in the devserver here but I can't find information about how to implement this in the php server...

Any Ideas ?

Problem running on Ubuntu 16.04

Hello everyone,
I've tried to install kirby-webpack on my local Ubuntu 16.04 with following setup:
PHP 7.2.2
node.js 7.10.1
npm 4.20

I get the following error message:
$ npm run start
> [email protected] start /home/xxx/
> node scripts/check-preprocessor.js && cross-env NODE_ENV=development node scripts/webpack-serve.js

[1/3] Starting a php server...
PHP Server started on localhost:35410

⚠️ Warning:
Node can't reach PHP built-in server through localhost.
Proxying [::1]:35410 instead.

[2/3] Running the webpack compiler...
webpack building...
webpack built 932b8f65491bcf8c154b in -9949ms
β„Ή ο½’wdmο½£: Version: webpack 3.11.0
Asset Size Chunks Chunk Names
assets/bundle.css 292 kB 0 [emitted] [big] assets/bundle.css
assets/bundle.js 244 kB 1 [emitted] assets/bundle.js
β„Ή ο½’wdmο½£: Compiled successfully.

[3/3] Starting the browser-sync server...
[Browsersync] Proxying: http://[::1]:35410
[Browsersync] Access URLs:
--------------------------------------
Local: http://localhost:8081
External: http://x.x.x.x:8081
--------------------------------------
UI: http://localhost:3001
UI External: http://x.x.x.x:3001
--------------------------------------
[Browsersync] Watching files...

βœ”οΈŽ Success: kirby-webpack server is up and running

Ports aren't in use through other services. Anyone have these problems to or someone can give me a hint?

Issues with loading assets in production

Hi i am able to load this font file in my dev environment but when i move to production i get a 404. I'm not sure what to do. By the way I changed my css preprocessor to SASS.

@font-face
  font-family: favorit
  src: url("/assets/fonts/fl.woff2") format('woff2')
  src: url("/assets/fonts/fl.woff") format('woff')
  src: url("/assets/fonts/fl.ttf") format('truetype')
  font-weight: 300
  font-style: normal
  font-display: fallback

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.