Open xereda opened 8 years ago
Do you use webpack?
Yeah.
Yeah
Em ter, 25 de out de 2016 às 12:15, Fangdun Cai notifications@github.com escreveu:
Do you use webpack?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vue-bulma/collapse/issues/3#issuecomment-256047051, or mute the thread https://github.com/notifications/unsubscribe-auth/ANrHOqsB6rg09gROacLuHhu4_mgiRD7Vks5q3g8GgaJpZM4Kf1j3 .
@xereda It's because this repo is not ready for production. It does not provide a dist folder with the bundled files. You have the raw files and need to use webpack loaders (babel, .vue, etc...) to build a valid js bundle. That's why it fail on line 1:1 in chrome 'import'... is not valid js
OK.
I am individually importing the component files (.vue files / Collapse.vue and Item.vue). Do you see any problem with that?
@xereda See https://github.com/fundon/vue-admin/blob/master/build/webpack.base.conf.js#L60-L65, Maybe it helps you.
An error has occurred. Analyze this:
xereda@macminixereda:~/S/d/docmob.portal.vuejs2.0:master$ npm run dev
docmob.portal.vuejs2.0@1.0.0 dev /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0 node build/dev-server.js
Listening at http://localhost:8080
/Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/webpack-core/lib/LoadersList.js:58 if(element.loader) return element.loader.split("!"); ^
TypeError: element.loader.split is not a function
at getLoadersFromObject (/Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/node_modules/webpack-core/lib/LoadersList.js:58:43)
at LoadersList.
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v6.8.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! docmob.portal.vuejs2.0@1.0.0 dev: node build/dev-server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the docmob.portal.vuejs2.0@1.0.0 dev script 'node build/dev-server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the docmob.portal.vuejs2.0 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs docmob.portal.vuejs2.0
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls docmob.portal.vuejs2.0
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /Users/xereda/Sites/docmob.local/docmob.portal.vuejs2.0/npm-debug.log
Init a new app localy with vue-cli then check the webpack config files to understand
Okay, but imported individually each vue component.
Tks.
In VueJS 2.0, the following error occurred:
index.js?11f0:1 Uncaught SyntaxError: Unexpected token import
I wait for a return. Tks.