-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Description
Version
3.0.1
Reproduction link
https://github.com/yangblink/vue-cli-umd-test
Node and OS info
Node v9.3.0 / npm 6.0.1/ macOS 10.13.1
Steps to reproduce
use vue-cli create a default project, and import a simple umd module umd.js,
umd.js
/* eslint-disable */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define("bxs", [], factory);
else if(typeof exports === 'object')
exports["bxs"] = factory();
else
root["bxs"] = factory();
})(window, function() {
return 'umd';
});when the file in /node_modules it's work fine,
copy it to other folder except /node_modules, it's undefined
import localumd from './umd.js'
import moduleumd from '../node_modules/umd.copy.js'
console.log(localumd); // undefined
console.log(moduleumd); // umdWhat is expected?
umd module can be recognize in any floder
What is actually happening?
umd module can be recognize only in path /node_modules
Metadata
Metadata
Assignees
Labels
No labels