【问题标题】:Bitbucket pipelines webpack build and ftp deploy NO JS OUTPUT on the serverBitbucket 管道 webpack 构建和 ftp 在服务器上部署 NO JS OUTPUT
【发布时间】:2018-06-09 09:33:12
【问题描述】:

我有我的管道构建设置:

  branches:
    production:
    - step:
        name: Build and test JS.
        image: node:8.9.3
        script:
          - npm install
          - npm test
          - npm run-script build
    - step:
        name: Build and test PHP.
        image: php:7-fpm
        script:
          - echo "Here will be the Composer build and PHPUnit tests."  
    - step:
        name: Deploy to FTP.
        image: samueldebruyn/debian-git
        script:
          - apt-get update
          - apt-get -qq install git-ftp
          - git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://$FTP_HOST

...问题是它构建时没有错误,但是我的服务器上没有标准的 webpack 输出 js 文件(应该出现在运行 webpack 的npm build 之后)。如何在该构建上将该输出 js 文件“放入”我的服务器?请寻求帮助。

【问题讨论】:

    标签: git webpack continuous-integration bitbucket bitbucket-pipelines


    【解决方案1】:

    我猜你在过去 6 个月以来已经找到了解决方案……如果有人遇到同样的问题:这就是我发现的。

    当模式设置为“生产”时,Bitbucket Pipelines 不会保存 Webpack (^4.12.0) 生成的构建。当构建处于开发模式(或“无”模式)时,一切都运行良好。

    export default {
    
    /*=========================================
    =            JAVASCRIPT FILES            =
    =========================================*/
    
    // https://webpack.js.org/concepts/targets/
    
    target: 'web',
    
    // production, development, none
    
    mode : 'none',
    

    【讨论】:

      猜你喜欢
      • 2017-10-17
      • 1970-01-01
      • 2020-10-20
      • 2017-12-18
      • 1970-01-01
      • 2018-04-29
      • 1970-01-01
      • 1970-01-01
      • 2017-04-06
      相关资源
      最近更新 更多