Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow options on LESS transform #42

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

calculuschild
Copy link

LESS transform does not allow custom options such as "paths", which PACK supports for the other transforms.

i.e., from the README.md:

const run = async ()=>{
  const { bundle, render, ssr } = pack('./client/main.jsx', {
    libs : ['very_large_lib.js'], // Won't have transforms applied to it
    paths : ['./client/shared']   // option passed to Browserify
  });

However this ./.client/shared folder is not accessible to the LESS transform. Allows changing this:

await fs.outputFile('./build/homebrew/bundle.css', await lessTransform.generate());

to this:

await fs.outputFile('./build/homebrew/bundle.css', await lessTransform.generate({paths: './shared'}));

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

Successfully merging this pull request may close these issues.

1 participant