rubenv / angular-gettext-tools

Tools for extracting/compiling angular-gettext strings.
http://angular-gettext.rocketeer.be/
MIT License
39 stars 130 forks source link

Webpack issue #164

Open thierryskoda opened 7 years ago

thierryskoda commented 7 years ago

Anyone having some issues using https://github.com/princed/angular-gettext-loader.

I have my .po file at the root and I added the loader in my Webpack config file and nothing happens...

Here's where I add the loader:

module: {
        preLoaders: [
            {
                test: /\.html$/,
                exclude: /node_modules/,
                loader: WebpackAngularGettext.loader()
            },
            {
                test: /\.js$/,
                loader: WebpackAngularGettext.loader()
            }
        ],
        loaders: [
            {test: /\.js$/, loader: 'babel-loader', exclude: /(node_modules|bower_components)/, query: {presets: ['stage-3', 'es2015'], plugins: ['transform-runtime']}},
            {test: /\.scss$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader!postcss-loader!sass-loader')},
            {test: /\.html$/, loader: 'html-loader'},
            {test: /\.json$/, loader: 'json-loader'},
            {test: /\.po$/, loader: 'angular-gettext'}
        ]
    },

Am I missing something?

Thank you for any help

princed commented 7 years ago

Well, you should've created the issue in https://github.com/princed/angular-gettext-loader to let me see it :)

Didn't you forget to require your .po files?