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

ReferenceError: requiere is not defined on gulp postcss #102

Open
Angstromico opened this issue Apr 22, 2021 · 1 comment
Open

ReferenceError: requiere is not defined on gulp postcss #102

Angstromico opened this issue Apr 22, 2021 · 1 comment

Comments

@Angstromico
Copy link

Angstromico commented Apr 22, 2021

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"
}

@Angstromico Angstromico changed the title ReferenceError: requiere is not defined ReferenceError: requiere is not defined on gulp postcss Apr 22, 2021
@liady
Copy link
Owner

liady commented Apr 23, 2021

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

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

2 participants