2

I use React on client, and i need include css from npm package. Before I took them and copied to my local directorie with style.

I also use GULP in the working draft

1 Answer 1

4

You can use gulp to copy files from node_modules as part of your build:

var srcPath = "node_modules/whatever/stylesheets/*.css";
var buildPath = "folder/that/gets/served/to/client";
gulp.task("build-html", function () {
    return gulp.src(srcPath).pipe(gulp.dest(buildPath));
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.