-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Message about "setup" when using cli only #1118
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
Labels
Comments
This is by design. Change your config to use |
I understand the point but… where I've got any |
// webpack.config.js
import path from 'path'
import webpack from 'webpack'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import babelConfig from './babel.config.js'
import envVars from './env.json'
const SRC_DIR = path.resolve(__dirname, 'src')
const DIST_DIR = path.resolve(__dirname, 'dist')
export default (env) => {
return {
// the source
entry: [
'react-hot-loader/patch',
`${SRC_DIR}/index.js`,
],
// the destination
output: {
path: DIST_DIR,
filename: 'index.js',
publicPath: '/'
},
resolve: {
alias: {
'~': `${SRC_DIR}`, // thanks to that, we can use import xxx from '~/file'
}
},
// active devtools
// devtool: 'eval',
devtool: 'cheap-module-inline-source-map',
// devtool: 'cheap-module-source-map',
// plugins
plugins: [
new HtmlWebpackPlugin({
template: 'src/index.html',
favicon: 'src/favicon.ico',
segmentToken: JSON.stringify(envVars[env.flag].SEGMENT_TOKEN),
}),
new webpack.DefinePlugin({
API_URL: JSON.stringify(envVars[env.api].API_URL),
JOURNAL_URL: JSON.stringify(envVars[env.flag].JOURNAL_URL),
FLAG: JSON.stringify(env.flag),
'process.env': {
'NODE_ENV': JSON.stringify('development')
}
}),
],
// what will be used for each type of code
module: {
rules: [
// javascript
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: babelConfig,
},
// files
{
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000
}
}
},
// styles
{
test: /\.css$/,
exclude: /\.module\.css$/,
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
modules: false,
importLoaders: 1,
import: true,
alias: {
'~': `${SRC_DIR}`
}
}
},
{
loader: 'postcss-loader'
}
]
},
{
test: /\.module\.css$/,
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
modules: true,
importLoaders: 1,
localIdentName: '[path][name]--[local]-___[hash:base64:5]',
import: true,
alias: {
'~': `${SRC_DIR}`
}
}
},
{
loader: 'postcss-loader'
}
]
},
// images
{
test: /.*\.(gif|png|jpe?g|svg)$/i,
use: [
{
loader: 'file-loader'
}
]
}
]
}
}
} |
This was referenced Sep 27, 2017
Yep. Looks like we missed the position of those messages. Patch will be published. |
Fixed in 8de5d0a and published |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code
Expected Behavior
No message.
Actual Behavior
For Bugs; How can we reproduce the behavior?
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: