Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Add paths support #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add paths support #55

wants to merge 1 commit into from

Conversation

mrcthms
Copy link
Contributor

@mrcthms mrcthms commented Nov 22, 2016

This gives us the ability to support the paths feature of browserify which allows us to do really nice things such as:

var jsOpts = {
  src: './src/js/script.js',
  dest: path.join(buildPath, 'js/bundle.min.js'),
  react: true,
  resolvePath: resolvePath,
  jquery: false,
  paths: ['./src/helpers']
};

which then in tern allow us to do the following:

// src/js/partials/Footer/Footer.js

// bad horrible
import { helperName } from '../../../helpers/helperFile';

// yayyyy
import { helperName } from 'helperFile';

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant