correct use / import
See original GitHub issueI cloned the hackernews example app with SSRS and I’m trying to use this icons but something goes wrong
import 'vue-awesome/icons'
import Icon from 'vue-awesome/components/Icon.vue'
export default {
components : {
Icon
},
thats how I try to import the icons
error during render : /
/home/examples/vue/hackernews/node_modules/vue-awesome/icons/index.js:1
(function (exports, require, module, __filename, __dirname) { import './500px'
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Import definition and meaning | Collins English Dictionary
1. transitive verb/intransitive verb. To import products or raw materials means to buy them from another country for use in your own country....
Read more >Import Definition & Meaning - Merriam-Webster
The meaning of IMPORT is to bring from a foreign or external source. How to use import in a sentence.
Read more >import - JavaScript - MDN Web Docs - Mozilla
The static import declaration is used to import read-only live bindings which are exported by another module. The imported bindings are ...
Read more >Import Definition & Meaning | Dictionary.com
Import definition, to bring in (merchandise, commodities, workers, etc.) from a foreign country for use, sale, processing, reexport, or services. See more.
Read more >How to correctly use import in Node JS - Stack Overflow
What do I need to change to get import to work? I have 3 simple files in the same directory. package.json; main.js; Utility.js....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am using vue-cli. it is working in dev. but running vue jest i get
For SSR you need to:
babel-loader
by modifying theexclude
option.webpack-node-externals
, whitelistvue-awesome
to include it into the server bundle.You can look into the example provided by @d1820 here: https://github.com/Justineo/vue-awesome/issues/65#issuecomment-337116728