URGENT@ Aurelia with webpack

core.js

/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function webpack_require(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, webpack_require);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (webpack_modules)
/******/ webpack_require.m = modules;
/******/
/******/ // expose the module cache
/******/ webpack_require.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ webpack_require.d = function(exports, name, getter) {
/******/ if(!webpack_require.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ webpack_require.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module[‘default’]; } :
/******/ function getModuleExports() { return module; };
/******/ webpack_require.d(getter, ‘a’, getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ webpack_require.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // webpack_public_path
/******/ webpack_require.p = “”;
/******/
/******/ // Load entry module and return exports
/******/ return webpack_require(webpack_require.s = 0);
/******/ })
/************************************************************************/
/*****/ ([
/
0 /
/
**/ (function(module, webpack_exports, webpack_require) {

“use strict”;
Object.defineProperty(webpack_exports, “__esModule”, { value: true });

// CONCATENATED MODULE: ./src/a.js
class a {
constructor() {}
}

// CONCATENATED MODULE: ./src/b.js
class b {
constrcutor () {}
}

// CONCATENATED MODULE: ./src/header.js
export class Header {

constructor() {
    this.headerName = 'today + tomorrow';
}

}

// CONCATENATED MODULE: ./src/entry.js

/***/ })
/******/ ]);

app.js in src

import { Header } from ‘core’;

export class App extends Header {
constructor() {
super();
this.message = ‘ABCKNSCSC Hello World!’;

//this.headerName = new Header().headerName;

}
}

Showing error Header is not defined

This doesn’t have nothing to do with Aurelia. How did you create this ?

I have 4 files. a.js b.js header.js and core.js

and I am importing a.js b.js and header.js to the app.js and then I ran npx webpack src/app.js dist/core.js.

So at the last actually I want is core.js should have all js file what I need like bundle.js and I can use that core.js file in aurelia to make imports for example where ever I need a.js I can write import { A } from 'core.' if I need b.js thenimport { B } from 'core'

So I made that bundle as core.js and trying to import Header like import { Header } from 'core' but it is giving me error Header is not defined.

I made core.js using latest webpack version

dist is not normally on the search path for modules you will have to find the resolve.modules in your aurelia webpack setup and add dist there.