webpack symfony引擎捆绑资产配置babel加载器

时间:2019-05-24 18:42:13

标签: symfony

symfony说函数未定义,我不明白为什么 您能帮忙吗,我收到的消息是:你好,未定义 我试图配置webpack.config.js

   const webpack = require("webpack");
   const path = require("path");

   let config = {
      mode: 'development',
      entry: "./assets/js/login.js",
      output: {
        path: path.resolve(__dirname, "./public/build/js"),
        filename: "loginn.js"
    },
     module: {
         rules: [
             {
                 test: /\.js$/,
                 use: 'babel-loader',
    //             exclude: /node_modules/,
    //             query: {
    //                 presets: ['es2015']
                }
             ]
    //         {
    //             test: /\.css$/,
    //             loaders: ['style-loader', 'css-loader']
    //         }
    //     ]
    //
    }
};
module.exports=config ;
// module.exports = Encore.getWebpackConfig();

  require ('lodash')
   var hello =function(){
   console.log('coucou');

};

0 个答案:

没有答案