fen
2 months ago
261
1
Mix

set up webpack in laravel/vue

Posted 2 months ago by fen

Hi,

I made a project with vue-cli, and to create svg sprite I set up in vue.config.js like this:

    chainWebpack(config) {
        // set svg-sprite-loader
        config.module
          .rule('svg')
          .exclude.add(resolve('src/icons'))
          .end()

        config.module
          .rule('icons')
          .test(/\.svg$/)
          .include.add(resolve('src/icons'))
          .end()
          .use('svg-sprite-loader')
          .loader('svg-sprite-loader')
          .options({
            symbolId: 'icon-[name]'
          })
          .end()
    }

How to set up the same thing in a laravel/vue project?

Thank you in advance

Please sign in or create an account to participate in this conversation.