Answer the question
In order to leave comments, you need to log in
Why do commas disappear in texts after WebPack build?
Hello!
I ran into a problem that when building the frontend in bundle.js, commas in the text disappear.
That is, a system for displaying messages that are embedded in the project.
For example,
const dict = {
msg1: ['Тут текст, где есть запятая']
}
import Path from 'path';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import Webpack from 'webpack';
import webpackPaths from './webpackPaths';
const { resolve } = webpackPaths;
const WebpackConfig = {
entry: [
Path.resolve(__dirname, 'app/app.js')
],
output: {
filename: 'bundle.js',
path: Path.resolve(__dirname, 'build')
},
module: {
loaders: [
{ test: /\.js(\?.+)?$/, exclude: /node_modules(?![\/\\]qqq-)/, loaders: ['es3ify', 'babel'] },
{ test: /\.(scss|css)(\?.+)?$/, loader: ExtractTextPlugin.extract('style', 'css!sass') },
{ test: /\.png(\?.+)?$/, loader: 'file-loader?name=./images/[hash].[ext]&mimetype=image/png' },
{ test: /\.gif(\?.+)?$/, loader: 'file-loader?name=./images/[hash].[ext]&mimetype=image/gif' },
{ test: /\.svg(\?.+)?$/, loader: 'file-loader?name=./images/[hash].[ext]&limit=10000&mimetype=image/svg+xml' },
{
test: /\.ttf(\?.+)?$/,
loader: 'file-loader?name=./fonts/[hash].[ext]&limit=10000&mimetype=application/font-ttf'
},
{
test: /\.woff(\?.+)?$/,
loader: 'file-loader?name=./fonts/[hash].[ext]&limit=10000&mimetype=application/font-woff'
},
{
test: /\.eot(\?.+)?$/,
loader: 'file-loader?name=./fonts/[hash].[ext]&limit=10000&mimetype=application/vnd.ms-fontobject'
}
]
},
resolve,
plugins: [
new Webpack.optimize.DedupePlugin(),
new ExtractTextPlugin('bundle.css')
],
sassLoader: {
outputStyle: 'compressed'
}
};
export default WebpackConfig;
Answer the question
In order to leave comments, you need to log in
Предположу, что это все es3ify-loader.
Зачем вам поддержка динозавров?
https://github.com/spicyj/es3ify/blob/master/index...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question