mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 20:41:07 +08:00
Brought back (flaky) Firefox support
This commit is contained in:
parent
aa9a51e91f
commit
2bd338a62d
@ -73,7 +73,8 @@
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-dev-middleware": "^1.12.0",
|
||||
"webpack-hot-middleware": "^2.20.0",
|
||||
"@webcomponents/webcomponentsjs": "^1.0.17"
|
||||
"@webcomponents/webcomponentsjs": "^1.0.17",
|
||||
"copy-webpack-plugin": "^4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
|
@ -2,6 +2,7 @@ import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
||||
import WatchMissingNodeModulesPlugin from './WatchMissingNodeModulesPlugin';
|
||||
import {
|
||||
getConfigDir,
|
||||
@ -22,8 +23,6 @@ export default function() {
|
||||
manager: [require.resolve('./polyfills'), require.resolve('../../client/manager')],
|
||||
preview: [
|
||||
require.resolve('./polyfills'),
|
||||
require.resolve('@webcomponents/webcomponentsjs/webcomponents-loader.js'),
|
||||
require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js'),
|
||||
require.resolve('./globals'),
|
||||
`${require.resolve('webpack-hot-middleware/client')}?reload=true`,
|
||||
],
|
||||
@ -51,6 +50,15 @@ export default function() {
|
||||
},
|
||||
template: require.resolve('../iframe.html.ejs'),
|
||||
}),
|
||||
new CopyWebpackPlugin([
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-loader.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-hi.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-hi-ce.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-hi-sd-ce.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-lite.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-sd-ce.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js') },
|
||||
]),
|
||||
new webpack.DefinePlugin(loadEnv()),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new CaseSensitivePathsPlugin(),
|
||||
|
@ -1,6 +1,7 @@
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import CopyWebpackPlugin from 'copy-webpack-plugin';
|
||||
import babelLoaderConfig from './babel.prod';
|
||||
import { getConfigDir, includePaths, excludePaths, loadEnv, nodePaths } from './utils';
|
||||
import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils';
|
||||
@ -8,12 +9,7 @@ import { version } from '../../../package.json';
|
||||
|
||||
export default function() {
|
||||
const entries = {
|
||||
preview: [
|
||||
require.resolve('./polyfills'),
|
||||
require.resolve('@webcomponents/webcomponentsjs/webcomponents-loader.js'),
|
||||
require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js'),
|
||||
require.resolve('./globals'),
|
||||
],
|
||||
preview: [require.resolve('./polyfills'), require.resolve('./globals')],
|
||||
manager: [require.resolve('./polyfills'), path.resolve(__dirname, '../../client/manager')],
|
||||
};
|
||||
|
||||
@ -48,6 +44,15 @@ export default function() {
|
||||
},
|
||||
template: require.resolve('../iframe.html.ejs'),
|
||||
}),
|
||||
new CopyWebpackPlugin([
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-loader.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-hi.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-hi-ce.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-hi-sd-ce.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-lite.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/webcomponents-sd-ce.js') },
|
||||
{ from: require.resolve('@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js') },
|
||||
]),
|
||||
new webpack.DefinePlugin(loadEnv({ production: true })),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
|
@ -5,6 +5,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<base target="_parent">
|
||||
<title>Storybook</title>
|
||||
<script src="webcomponents-loader.js"></script>
|
||||
<script src="custom-elements-es5-adapter.js"></script>
|
||||
<%= htmlWebpackPlugin.options.data.previewHead %>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -93,8 +93,7 @@
|
||||
"remark-preset-lint-recommended": "^3.0.1",
|
||||
"remark-toc": "^4.0.1",
|
||||
"shelljs": "^0.7.8",
|
||||
"symlink-dir": "^1.1.0",
|
||||
"copy-webpack-plugin": "^4.2.0"
|
||||
"symlink-dir": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user