如何将数据导入到phppack的Php阵列?

时间:2017-10-28 15:32:50

标签: php webpack webpack-2 loader

美好的一天

  1. 我是为webpack安装php loader

    php loader for webpack

  2. 文件

  3. index.js

    <?php
    return [
        'bar' => 'foo',
        'foo' => 'bar',
    ];
    

    webpack.config.js

    ERROR in ./index.js
    Module not found: Error: Can't resolve 'php' in 
    'C:\local\php'
     @ ./index.js 6:18-44
    

    的index.php

    @IBAction func sendEmail(_ sender: Any) {
            let composeVC = MFMailComposeViewController()
            composeVC.mailComposeDelegate = self
    
            // Configure the fields of the interface.
            composeVC.setToRecipients(["test@gmail.com"])
            composeVC.setSubject("Feedback")
            composeVC.setMessageBody("", isHTML: false)
    
            // Present the view controller modally.
            self.present(composeVC, animated: true, completion: nil) //CRASHES
        }
    
        func mailComposeController(_ controller: MFMailComposeViewController,
                                   didFinishWith result: MFMailComposeResult, error: Error?) {
            // Check the result or perform other tasks.
    
            // Dismiss the mail compose view controller.
            controller.dismiss(animated: true, completion: nil)
        }
    

    运行webpack

    minimumAspectRatio

    为什么webpack无法看到这个php文件?

    enter image description here

    enter image description here

0 个答案:

没有答案