liady / webpack-node-externals

Easily exclude node modules in Webpack
MIT License
1.3k stars 62 forks source link

ReferenceError: requiere is not defined on gulp postcss #102

Open Angstromico opened 3 years ago

Angstromico commented 3 years ago

When I install postcss on my gulp, gulp stop working and give me that error and I don't understand why, this is the code on gulpfile.js: const {src, dest, watch} = require('gulp'); var sass = require('gulp-dart-sass'); const patchs = { scss: 'src/scss/*/.scss', css: './shield/css', js: 'JavaScript/*/.js', jf: './shield/JavaScript' } //CSS Utilities const autoprefixer = require('autoprefixer'); const postcss = requiere('postcss'); const cssnano = require('cssnano'); function experiment() { return src(patchs.scss) .pipe( sass({ //outputStyle: 'expanded' outputStyle: 'compressed' }) ) .pipe( postcss( [autoprefixer(), cssnano() ] ) ) .pipe(dest(patchs.css)) } function gulpScript() { return src(patchs.js)
.pipe(concat('bundle.js')) .pipe(dest(patchs.jf)) } function watchExp() { watch(patchs.scss, experiment); watch(patchs.js, gulpScript) } exports.default = watchExp; This is my post.config.js: module.exports = { plugins: { "autoprefixer": true } } This is on my package.json: "devDependencies": { "autoprefixer": "^10.2.5", "cssnano": "^5.0.1", "gulp": "^4.0.2", "gulp-dart-sass": "^1.0.2", "gulp-imagemin": "^7.1.0", "gulp-postcss": "^9.0.0", "gulp-sourcemaps": "^3.0.0", "gulp-webp": "^4.0.1", "postcss": "^8.2.10" }, "dependencies": { "gulp-concat": "^2.6.1" }

liady commented 3 years ago

@Angstromico Hey, is this related to webpack-node-externals?