R
R
Russland Russland2017-01-12 10:20:31
JavaScript
Russland Russland, 2017-01-12 10:20:31

Vendor code in a separate file, own - in a separate file. Is it possible to set up Browserify this way?

Recently started using browserify to build js. After the project was completed, the customer requested that the library code and user code be in two different files. The modules code looks like this:

'use strict';

import $ from 'jquery';
import 'slick-carousel';

const $slider = $('.slider');

export default function()  {
    // some code
}

Is it possible to set up js build like this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2017-01-12
@ruslanshakir

I collected vendors in a separate task. In general, I rarely use browserify, I prefer webpack.
Here's something like this I had https://gist.github.com/delphinpro/2442f25e3c2d2fa... for browserify.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question