Skip to content

Commit

Permalink
fix: gatsby site examples
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Nov 14, 2019
1 parent 9a9af73 commit 624a88b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16,189 deletions.
23 changes: 2 additions & 21 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -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: [
[
Expand All @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -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 changes: 7 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 624a88b

Please sign in to comment.