mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
Free your mind of the babel and the packed web
ember-cli-storybook and storybook itself has progressed to the point where the DIY configs aren't necessary. It's all swept under the `framework: '@storybook/ember'` config in main.js. Yay!
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
/* eslint-env node */
|
||||
|
||||
const templateCompiler = require('ember-source/dist/ember-template-compiler');
|
||||
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
shippedProposals: true,
|
||||
useBuiltIns: 'usage',
|
||||
corejs: '3',
|
||||
targets: [
|
||||
'last 1 Chrome versions',
|
||||
'last 1 Firefox versions',
|
||||
'last 1 Safari versions',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
'@babel/plugin-proposal-decorators',
|
||||
{
|
||||
legacy: true,
|
||||
},
|
||||
],
|
||||
['@babel/plugin-proposal-class-properties', { loose: true }],
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
[
|
||||
'@babel/plugin-proposal-object-rest-spread',
|
||||
{ loose: true, useBuiltIns: true },
|
||||
],
|
||||
'babel-plugin-macros',
|
||||
['emotion', { sourceMap: true, autoLabel: true }],
|
||||
[
|
||||
'babel-plugin-htmlbars-inline-precompile',
|
||||
{
|
||||
precompile: templateCompiler.precompile,
|
||||
modules: {
|
||||
'ember-cli-htmlbars': 'hbs',
|
||||
'ember-cli-htmlbars-inline-precompile': 'default',
|
||||
'htmlbars-inline-precompile': 'default',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
/* eslint-env node */
|
||||
module.exports = {
|
||||
framework: '@storybook/ember',
|
||||
addons: [
|
||||
'@storybook/addon-docs',
|
||||
'@storybook/addon-storysource',
|
||||
@@ -16,4 +17,7 @@ module.exports = {
|
||||
'../stories/components/*.stories.js',
|
||||
'../stories/charts/*.stories.js',
|
||||
],
|
||||
core: {
|
||||
builder: '@storybook/builder-webpack4',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
/* eslint-env node */
|
||||
module.exports = function ({ config }) {
|
||||
config.module.rules.push({
|
||||
test: /\.stories\.jsx?$/,
|
||||
loaders: [require.resolve('@storybook/source-loader')],
|
||||
enforce: 'pre',
|
||||
});
|
||||
|
||||
return config;
|
||||
};
|
||||
Reference in New Issue
Block a user