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

Error with webpack 2 #8

Open
pavel-surinin opened this issue Jul 26, 2017 · 0 comments
Open

Error with webpack 2 #8

pavel-surinin opened this issue Jul 26, 2017 · 0 comments

Comments

@pavel-surinin
Copy link

I used this plugin with webpack 1 and had no issues.

webpack config:

const OmitTildeWebpackPlugin = require('omit-tilde-webpack-plugin');
...
module.exports = {
module: {
  rules: [
      ... ,
      {
                test: /\.less$/,
                use: ExtractTextPlugin.extract({
                    fallback: 'style-loader',
                    use: [
                        'css-loader',
                        {loader : 'postcss-loader', options: {
                            plugins: () => require('autoprefixer')({ browsers:['last 3 version'] })
                        }},
                        'less-loader'
                    ]
                }),
            },
    ]
},
plugins: [
    ...
    new OmitTildeWebpackPlugin({
        deprecate: true
    }),
  ...
}

I'm getting an error:

C:\source\project\node_modules\webpack\bin\webpack.js:323
		throw e;
		^

TypeError: Cannot read property 'plugin' of null
    at OmitTildeWebpackPlugin.apply (C:\source\project\node_modules\omit-tilde-webpack-plugin\index.js:23:28)
    at Compiler.apply (C:\source\project\node_modules\webpack\node_modules\tapable\lib\Tapable.js:357:16)
    at webpack (C:\source\project\node_modules\webpack\lib\webpack.js:32:19)
    at processOptions (C:\source\project\node_modules\webpack\bin\webpack.js:313:14)
    at Object.<anonymous> (C:\source\project\node_modules\webpack\bin\webpack.js:373:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:393:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:508:3
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

No branches or pull requests

1 participant