简体   繁体   中英

import js package not working inside another import js file in webpack

i am using webpack js bundle for my project.I have published a npm module and which included in my webpack entry file.i can access it inside entry file.But that file i can not access inside another file which included in entry file in webpack.Here is my entry file

import myClass from  "sbkkoovery-esign";
 console.log(myClass);
import "jquery";
import 'bootstrap';
import "./js/app";

here 'myClass' is working properly.But i tried to access 'myClass' inside '/js/app' file.But i am getting error.Here is mu 'js/app' file

console.log("here");
console.log(myClass);

I was also facing same issue few days back, In this case, rather then to use any node-plugin I have directly given "javascriptfilename.min.js" file path inside tags in "index.html". Note: This is not the correct solution, this is just temporary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM