Stencil: TypeError: autoprefixer is not a function

Created on 28 Aug 2018  路  3Comments  路  Source: ionic-team/stencil

Stencil version:

 0.12.1

I'm submitting a:

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

Reported by a community member I am working with. Reproduced in a simple repo that I have.

~/Projects/Demos/kws-weather-widgets (bug/autoprefixer *): npm run build

> [email protected] build /Users/kensodemann/Projects/Demos/kws-weather-widgets
> stencil build


[ ERROR ]  autoprefixer is not a function TypeError: autoprefixer is not a
           function at Object.<anonymous>
           (/Users/kensodemann/Projects/Demos/kws-weather-widgets/stencil.config.ts:25:23)
           at Module._compile (module.js:649:30) at
           Object.require.extensions..js
           (/Users/kensodemann/Projects/Demos/kws-weather-widgets/node_modules/@stencil/core/dist/sys/node/index.js:766:20)
           at Module.load (module.js:561:32) at tryModuleLoad
           (module.js:501:12) at Function.Module._load (module.js:493:3) at
           Module.require (module.js:593:17) at require
           (internal/module.js:11:18) at requireConfigFile
           (/Users/kensodemann/Projects/Demos/kws-weather-widgets/node_modules/@stencil/core/dist/sys/node/index.js:773:20)
           at loadConfigFile
           (/Users/kensodemann/Projects/Demos/kws-weather-widgets/node_modules/@stencil/core/dist/sys/node/index.js:717:32)

Expected behavior:
It should build

Steps to reproduce:

  1. git clone [email protected]:kensodemann/kws-weather-widgets.git
  2. git checkout bug/autoprefixer
  3. npm i
  4. npm run build
  5. That _should_ work
  6. upgrade stencil/core from 0.11.4 to 0.12.1
  7. npm run build
  8. That _should_ blow chunks
triage

Most helpful comment

You should be able to import autoprefixer from 'autoprefixer' instead of * as

I didn't check into the cause of the change much, but had the same occur with a few other postcss plugins I was using

All 3 comments

You should be able to import autoprefixer from 'autoprefixer' instead of * as

I didn't check into the cause of the change much, but had the same occur with a few other postcss plugins I was using

Good call @mattcosta7!!

Was this page helpful?
0 / 5 - 0 ratings