fix: gatsby site examples

This commit is contained in:
afc163 2019-11-14 18:15:58 +08:00
parent 4184e12ecf
commit 2a591a975e
4 changed files with 13 additions and 16189 deletions

View File

@ -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',

View File

@ -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');

7
gatsby-node.js Normal file
View File

@ -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);
};

16164
yarn.lock

File diff suppressed because it is too large Load Diff