forked from arcticicestudio/arctic-landscape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
56 lines (54 loc) · 1.87 KB
/
babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Copyright (C) 2019-present Arctic Ice Studio <[email protected]>
* Copyright (C) 2019-present Sven Greb <[email protected]>
*
* Project: Arctic Landscape
* Repository: https://github.com/arcticicestudio/arctic-landscape
* License: MIT
*/
/**
* @file The Babel configuration.
* @author Arctic Ice Studio <[email protected]>
* @author Sven Greb <[email protected]>
* @see https://babeljs.io
* @since 0.1.0
*/
module.exports = {
presets: [
/**
* Note that it is not required to specifiy `modules: false` as of Babel 7 - it knows automatically that Rollup
* understands ES modules & that it shouldn't use any module transform with it.
*
* @see https://github.com/rollup/rollup-plugin-babel#modules
*/
["@babel/env", { loose: true }],
"@babel/react"
],
plugins: [
"@babel/plugin-proposal-export-default-from",
/**
* Add support for server-side rendering, minification of styles, and a nicer debugging experience.
*
* @see https://www.styled-components.com/docs/tooling#babel-plugin
*/
"babel-plugin-styled-components",
[
"babel-plugin-transform-react-remove-prop-types",
{
removeImport: true,
/**
* Ensure to keep `propTypes` working at runtime for the main public API component `ArcticLandscape`.
*
* @see https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types#ignorefilenames
*/
ignoreFilenames: ["node_modules", "ArcticLandscape.jsx"],
/**
* Ensure to also remove prop types imported from the shared module at `shared/propTypes.js`.
*
* @see https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types#additionallibraries
*/
additionalLibraries: [/\/shared\/propTypes$/]
}
]
]
};