Skip to content

Commit 0095409

Browse files
committed
refactor(rollup): inline babel config to prevent commonjs transform from running
1 parent 6a6c2e6 commit 0095409

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

rollup.config.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,33 @@ const baseConfig = {
8888
extensions,
8989
exclude: /node_modules/,
9090
babelHelpers: 'inline',
91-
babelrc: false
91+
babelrc: false,
92+
configFile: false,
93+
presets: [
94+
'@babel/preset-typescript',
95+
[
96+
'@babel/preset-react',
97+
{
98+
modules: false
99+
}
100+
]
101+
],
102+
plugins: [
103+
'macros',
104+
'preval',
105+
'add-react-displayname',
106+
'babel-plugin-styled-components',
107+
'@babel/plugin-proposal-nullish-coalescing-operator',
108+
'@babel/plugin-proposal-optional-chaining',
109+
[
110+
'babel-plugin-transform-replace-expressions',
111+
{
112+
replace: {
113+
__DEV__: "process.env.NODE_ENV !== 'production'"
114+
}
115+
}
116+
]
117+
]
92118
}),
93119
commonjs(),
94120
resolve({

0 commit comments

Comments
 (0)