承接 rodrigoq/simple-webpack-encore-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rodrigoq/simple-webpack-encore-bundle

Composer 安装命令:

composer require rodrigoq/simple-webpack-encore-bundle

包简介

Integration with your php and twig application & Webpack Encore!

README 文档

README

A very basic and simple implementation of WebpackEncoreBundle for projects that do not use Symfony, with easier setup and less dependencies. Recommended for old projects or projects that do not plan to add or setup Symfony. The frontend setup is the same as with Webpack Encore

Install with:

composer require rodrigoq/simple-webpack-encore-bundle

Configuration

In your twig setup file:

    use Simple\WebpackEncoreBundle\Twig\EntryFilesTwigExtension;
    ...
    $entrypointJsonFile = "path/to/entrypoints.json";
    $twigEnvironment->addExtension(new EntryFilesTwigExtension($entrypointJsonFile));

or for multiple builds:

    use Simple\WebpackEncoreBundle\Twig\EntryFilesTwigExtension;
    ...
    $builds = [
        'firstConfig' => "path/to/firstConfig/entrypoints.json",
        'secondConfig' => "path/to/secondConfig/entrypoints.json",
    ];
    $twigEnvironment->addExtension(new EntryFilesTwigExtension($builds));

No need for yaml configuration file.

Usage

Check readme on the original repo.

Changes

Added two new twig functions for full URL or directory prefixing, you can have a full path or different paths configured in php not needing for code on your javascript configuration file.

    {{ encore_entry_script_tags_with_baseurl('app', 'https://yoursite.com') }}
    {{ encore_entry_link_tags_with_baseurl('app', 'https://yoursite.com') }}

    {# or any directory prefix #}

    {{ encore_entry_script_tags_with_baseurl('app', '/a/different/path') }}
    {{ encore_entry_link_tags_with_baseurl('app', '/a/different/path') }}

统计信息

  • 总下载量: 9.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 83
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固