The module encapsulated by angularjs1.3, using webpack+AMD mode cannot be found

I expect to use webpack + AMD to handle angularjs1.3, hoping to make the code structure feel better (I actually want to try it). Now I"ve created a loginModule, but can"t find the module I defined in controller.js. The code is as follows:
index.js

require("./page/login/login.module.js");
require("./page/login/login.controller.js");
const app = angular.module("app", [
    "ui.router",
    "lumx",
    "loginModule"
]).run(runConfig).config(routerConfig);

login.module.js

define("loginModule", [], function() {
    "use strict";
    return angular.module("loginModule", []);
});

login.controller.js

define([
    "loginModule"
], function(loginModule) {
    "use strict";
});

compilation error

when I use loginModule in login.controller.js
ERROR in ./src/page/login/login.controller.js
Module not found: Error: Can"t resolve "loginModule" in "E:\workspace2\test\src\page\login"
 @ ./src/page/login/login.controller.js 1:0-3:2
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:8081 ./src/index.js
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
       1 module
i wdm: Failed to compile.

node does not support AMD
to distinguish between browser environment and node environment

Menu