-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootstrap not imported #79
Comments
Hi alex88, did you manage to get this to work? |
Hi @hirviid, unfortunately nope, I haven't :( |
same issue. I'm specifically trying to get the javascript to load. have you had any luck here? |
For anyone that comes back to this later, I've got it working by:
Full webpack.config.js (Mostly just the CSS loaders from React Redux Starter Kit):
And then in storybook/config.js:
|
Hi all, thanks for the solution. loaders: [
... other loaders
{
test: /\.(eot|woff|woff2|ttf|svg|png|jpg)$/,
loader: 'url-loader?limit=30000&name=[name]-[hash].[ext]'
} but after this none of my stories loads. Any idea? Thanks |
I manage to isolate the issue but I have no idea why this is not working. import { configure } from '@kadira/storybook';
import { setStubbingMode } from 'react-komposer';
import 'bootstrap-loader';
// Enable react-komposer stubbing.
// See: https://github.com/kadirahq/react-komposer#stubbing
setStubbingMode(true);
function loadStories() {
require('../client/modules/core/components/.stories');
require('../client/modules/noises/components/.stories');
require('../client/modules/users/components/.stories');
// require as many as stories you need.
}
configure(loadStories, module); my webpack.config.js is like: const path = require('path');
const BASE_CSS_LOADER = 'css?sourceMap&-minimize';
module.exports = {
module: {
entry: {
app: ['bootstrap-loader']
},
loaders: [
{
test: /\.scss$/,
loaders: [
'style',
BASE_CSS_LOADER,
'postcss',
'sass?sourceMap'
]
},
{
test: /\.css?$/,
loaders: [
'style',
BASE_CSS_LOADER,
'postcss'
],
include: path.resolve(__dirname, '../')
},
{
test : /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9=&.]+)?$/,
loader : 'file-loader'
}
]
}
} when I start sorybook I do not see any story loaded on the storybook. After Investigating a bit I saw that when using import bootstrap-loader it also requires JQuery. I'm now looking for a solution for this. |
Had the same issue but adding the following loader solved the issue with jQuery for me: {
test: /bootstrap-sass(\\|\/)assets(\\|\/)javascripts(\\|\/)/,
loader: 'imports?jQuery=jquery'
} You also need to install the |
Hey gkaran, thanks for the solution. It did the trick for me. :) |
I'm try to add my config
webpack
so what I could miss/mistake? |
You're using |
@ndelangen , this way?
|
Check out the webpack 1 to webpack 2 migration. the queries ( Basicly, you webpack config is a webpack 1. Which storybook does not support anymore. |
Could somebody help with properly webpack.config.js for Webpack 3? |
I think such a question would be best asked on https://stackoverflow.com where there are more users with webpack knowledge. |
Crikey!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-rc.0 containing PR #21491 that references this issue. Upgrade today to the
|
Hi there,
in my project I'm using
bootstrap--loader
within the entry configuration, in storybook I have:and
The text was updated successfully, but these errors were encountered: