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:
0.11.4 to 0.12.1You 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!!
This is most likely due to this commit. https://github.com/ionic-team/stencil/commit/2865faeb10af428f53da3c03c99f0b25d7d695a9
esModuleInterop was turned on. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html
Most helpful comment
You should be able to
import autoprefixer from 'autoprefixer'instead of * asI didn't check into the cause of the change much, but had the same occur with a few other postcss plugins I was using