Skip to content

Provide VueJS example #11

Description

@GauthierPLM

It would be awesome if a VueJS configuration example was made available.

I am struggling to make it work in a VueJS project: I obtain a build error (TypeError) when building the project:

yarn run v1.21.1
$ vue-cli-service build

 ERROR  Failed to compile with 1 errors

 error  in ./src/assets/logo.png

Module build failed (from ./node_modules/@brigad/ideal-image-loader/src/index.js):
TypeError: Cannot read property '1' of null
    at getSource (/Users/gauthier/WebstormProjects/untitled/node_modules/@brigad/ideal-image-loader/src/index.js:56:52)
    at /Users/gauthier/WebstormProjects/untitled/node_modules/@brigad/ideal-image-loader/src/index.js:138:25
    at Array.map (<anonymous>)
    at /Users/gauthier/WebstormProjects/untitled/node_modules/@brigad/ideal-image-loader/src/index.js:126:32

 @ ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"d4cb25de-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=template&id=7a951895& 1:167-195
 @ ./src/App.vue?vue&type=template&id=7a951895&
 @ ./src/App.vue
 @ ./src/main.js
 @ multi ./src/main.js

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Here is the fresh VueJS project I used to test with only ideal-image-loader added: https://github.com/GauthierPLM/test-brigad-ideal-image-loader
I am not really proficient with Webpack so I probably missed something...?

PS: your loader is the most complete I found matching a workflow integrating Zeplin 👍 Really hope to make it work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions