mirror of https://gitee.com/antv-l7/antv-l7
fix: gatsby site examples
This commit is contained in:
parent
7c58ebe505
commit
eccedee6ea
|
@ -1,21 +1,6 @@
|
||||||
// @see https://babeljs.io/docs/en/next/config-files#project-wide-configuration
|
// @see https://babeljs.io/docs/en/next/config-files#project-wide-configuration
|
||||||
module.exports = (api) => {
|
module.exports = (api) => {
|
||||||
api.cache(() => process.env.NODE_ENV);
|
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 {
|
return {
|
||||||
presets: [
|
presets: [
|
||||||
[
|
[
|
||||||
|
@ -27,13 +12,9 @@ module.exports = (api) => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
'@babel/preset-react',
|
||||||
'@babel/preset-react',
|
|
||||||
{
|
|
||||||
development: process.env.BABEL_ENV !== 'build',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
'@babel/preset-typescript',
|
'@babel/preset-typescript',
|
||||||
|
'babel-preset-gatsby',
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
'@babel/plugin-proposal-optional-chaining',
|
'@babel/plugin-proposal-optional-chaining',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import './packages/component/src/css/l7.css';
|
import './packages/component/src/css/l7.css';
|
||||||
// window.GeoTIFF = require('geotiff/dist/geotiff.bundle.js')
|
// window.GeoTIFF = require('geotiff/dist/geotiff.bundle.js')
|
||||||
window.scene = require('@l7/scene');
|
window.scene = require('./packages/scene/src');
|
||||||
window.layers= require('@l7/layers');
|
window.layers= require('./packages/layers/src');
|
||||||
window.component= require('@l7/component');
|
window.component= require('./packages/component/src');
|
||||||
window.G2Plot = require('@antv/g2plot');
|
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