Skip to content

refactor: disable source map using option  #195

Closed

Description

@alexander-akait

Is it possible to disable generation source map generation using options? This will speed up compilation on watch when i disable source map in webpack. It would be nice if this option was taken from the webpack config by default. If your accept i can do PR.

Activity

  1. michael-ciniawsky commented on Apr 7, 2017

    @michael-ciniawsky
    Contributor

    @evilebottnawi Yep, right, could you check the #177, I intend to do that for v2.0.0 since it is technically a semver major, but wainting for other related loaders I need to update first style-loader/ extract-text-webpack-plugin

  2. alexander-akait commented on Apr 7, 2017

    @alexander-akait
    MemberAuthor

    @michael-ciniawsky can i help you with this?

  3. michael-ciniawsky commented on Apr 7, 2017

    @michael-ciniawsky
    Contributor

    @evilebottnawi Yep 😛 test if disabling sourcemaps works correctly

    Sourcemap Implementation is here

    v2.0.0 should work without css-loader and export a module directly (perf), but it is planned to export ES2015 Modules in the near future and style-loader/ extract-text-webpack-plugin don't support that yet. If you what to try that out you need to change this line to a CJS Export

    - const module = `export default ${JSON.stringify(css)}`
    + const module = `module.exports = ${JSON.stringify(css)}`

    webpack.config.js

    const config = {
      module: {
        rules: [
          {
             test: /\.css$/,
             use: [ 'style-loader', 'postcss-loader' ]
          }
        ]
      }
    }

    Otherwise by using use: [ 'style-loader', 'css-loader', 'postcss-loader' ] you can skip that part, since postcss-loader will export a {String} as it is the current behaviour.

  4. michael-ciniawsky commented on Apr 7, 2017

    @michael-ciniawsky
    Contributor

    npm i -D michael-ciniawsky/postcss-loader#v2

  5. changed the title [-]Disable source map using option [/-] [+]refactor: Disable source map using option [/+] on Apr 18, 2017
  6. changed the title [-]refactor: Disable source map using option [/-] [+]refactor: disable source map using option [/+] on Apr 24, 2017
  7. added this to the milestone on Apr 24, 2017
  8. alexander-akait commented on Apr 27, 2017

    @alexander-akait
    MemberAuthor

    /cc @michael-ciniawsky let's do this, add options sourceMap as in css-loader?

  9. alexander-akait commented on Apr 28, 2017

    @alexander-akait
    MemberAuthor

    /cc @michael-ciniawsky ping 😄

  10. michael-ciniawsky commented on May 2, 2017

    @michael-ciniawsky
    Contributor

    Fixed by #191

  11. modified the milestones: , , on May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions