mirror of https://gitee.com/antv-l7/antv-l7
fix: gatsby site examples
This commit is contained in:
parent
4184e12ecf
commit
2a591a975e
|
@ -1,21 +1,6 @@
|
|||
// @see https://babeljs.io/docs/en/next/config-files#project-wide-configuration
|
||||
module.exports = (api) => {
|
||||
api.cache(() => process.env.NODE_ENV);
|
||||
if(api.env("site")) { //
|
||||
return {
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"loose": true,
|
||||
"modules": false
|
||||
}
|
||||
],
|
||||
'@babel/preset-react',
|
||||
"babel-preset-gatsby"
|
||||
]
|
||||
};
|
||||
}
|
||||
return {
|
||||
presets: [
|
||||
[
|
||||
|
@ -27,13 +12,9 @@ module.exports = (api) => {
|
|||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
'@babel/preset-react',
|
||||
{
|
||||
development: process.env.BABEL_ENV !== 'build',
|
||||
},
|
||||
],
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-typescript',
|
||||
'babel-preset-gatsby',
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import './packages/component/src/css/l7.css';
|
||||
// window.GeoTIFF = require('geotiff/dist/geotiff.bundle.js')
|
||||
window.scene = require('@l7/scene');
|
||||
window.layers= require('@l7/layers');
|
||||
window.component= require('@l7/component');
|
||||
window.G2Plot = require('@antv/g2plot');
|
||||
window.scene = require('./packages/scene/src');
|
||||
window.layers= require('./packages/layers/src');
|
||||
window.component= require('./packages/component/src');
|
||||
window.g2plot = require('@antv/g2plot');
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
const setWebpackConfig = require('./.storybook/webpack.config');
|
||||
|
||||
exports.onCreateWebpackConfig = ({ getConfig, stage, plugins }) => {
|
||||
const config = getConfig();
|
||||
config.resolve.extensions.push('.glsl');
|
||||
console.log(config);
|
||||
};
|
Loading…
Reference in New Issue