4

I have the following structure

src
  angular
    ...
      test.ts
      test.pug
      test.styl
  stylus
    main.styl

Currently I use the HtmlWebpackPlugin to add the angular folder to the application. Now I want a way to include just the main styles, after transpilation, in the template. I looked at the documentation and it doesn't seem like I can export provides an extension only a name.

How do I do this?

1 Answer 1

2

I did this by including the stylus-loader, style-loader, and css-loader...

 {
    test: /\.styl$/,
    loader: "style-loader!css-loader!stylus-loader"
 }

Then just include it as a separate chunk

entry: {
  ...
  styles: ['my.styl']
},

It will be a JS file but still load on page load.

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.