Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add npm import to vue-dynamic-import example #8

Conversation

rangermeier
Copy link
Contributor

With v2.0.0-alpha.3 import of any NPM module can't be resolved and will show an error like the following.

This PR adds an import of momentjs to the vue-dynamic-import example to demonstrate this error, but I also was able to reproduce this with e.g. the es6-plain example.

WARNING in ./src/components/HelloWorld.vue?vue&type=script&lang=js&babel-target=modern (/home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/babel-loader/lib??ref--3!./node_modules/vue-loader/lib!./src/components/HelloWorld.vue?vue&type=script&lang=js&babel-target=modern) 16:19-25
    "export 'default' (imported as 'moment') was not found in 'moment'
        at HarmonyImportSpecifierDependency._getErrors (/home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:113:11)
        at HarmonyImportSpecifierDependency.getWarnings (/home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15)
        at Compilation.reportDependencyErrorsAndWarnings (/home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compilation.js:1326:24)
        at Compilation.finish (/home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compilation.js:1137:9)
        at hooks.make.callAsync.err (/home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compiler.js:545:17)
        at _done (eval at create (/home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:9:1)
        at _promise1.then._result1 (eval at create (/home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:31:22)
        at <anonymous>
        at process._tickDomainCallback (internal/process/next_tick.js:229:7)
     @ ./src/components/HelloWorld.vue?vue&type=script&lang=js&babel-target=modern
     @ ./src/components/HelloWorld.vue
     @ /home/ranger/workspace/webpack-babel-multi-target-plugin/node_modules/babel-loader/lib??ref--3!./node_modules/vue-loader/lib!./src/App.vue?vue&type=script&lang=js&babel-target=modern
     @ ./src/App.vue?vue&type=script&lang=js&babel-target=modern
     @ ./src/App.vue?babel-target=modern
     @ ./src/main.js?babel-target=modern

@DanielSchaffer
Copy link
Owner

Looks like something weird is up with your branch here... I'm going to close and just make the change to the example project on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants