jamesandersen / string-replace-webpack-plugin

Replace string tokens in a bundle.
93 stars 27 forks source link

preserve source map after replacement #13

Closed rnons closed 7 years ago

rnons commented 8 years ago

I use string-replace-webpack-plugin together with extract-text-webpack-plugin for CSS in this way:

loader: StringReplacePlugin.replace(
  ExtractTextPlugin.extract('css-loader?sourceMap'), {
    replacements: [...]
  }, 'stylus-loader?sourceMap')

The sourcemap generated by stylus-loader disappears after replacement.

Or perhaps there are other ways to use these two plugins together?

jamesandersen commented 8 years ago

@rnons it looks like a couple of the unit tests are failing with this change

rnons commented 8 years ago

@jamesandersen Added a commit, tests pass now.

jamesandersen commented 7 years ago

@rnons no good excuses... I'm sorry for the huge delay; just lost track of this. Just merged in and published an update to NPM.

rnons commented 7 years ago

@jamesandersen no worry. Thanks for your project.